From 910d0f65a5e5d34f8383e5b59d1c7cfb58ac13f2 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 07:57:50 -0700 Subject: [PATCH 01/13] Auto-resolve promises in TypeScript codegen to prevent silent RPC drops Three changes to make un-awaited fluent chains work correctly: 1. Widen parameter types to accept PromiseLike for handle-type inputs 2. Auto-resolve promise-like params before RPC calls in all internal methods 3. Track pending mutating promises and flush them in build() This ensures that both awaited and un-awaited fluent chains produce correct results, preventing env vars and annotations from being silently dropped in publish/deploy mode. Fixes #15899 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- aspire.config.json | 8 + .../AtsTypeScriptCodeGenerator.cs | 133 +- .../Resources/transport.ts | 19 +- .../PublishedRuntimeReferenceDiagnostic.cs | 71 + .../AtsTypeScriptCodeGeneratorTests.cs | 4 +- .../Snapshots/AtsGeneratedAspire.verified.ts | 637 +- ...TwoPassScanningGeneratedAspire.verified.ts | 7421 +++++++++-------- .../Snapshots/transport.verified.ts | 19 +- ...ublishedRuntimeReferenceDiagnosticTests.cs | 53 + 9 files changed, 4498 insertions(+), 3867 deletions(-) create mode 100644 aspire.config.json create mode 100644 src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs create mode 100644 tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs diff --git a/aspire.config.json b/aspire.config.json new file mode 100644 index 00000000000..77e7e722128 --- /dev/null +++ b/aspire.config.json @@ -0,0 +1,8 @@ +{ + "appHost": { + "path": "../Mongo.AppHost.csproj" + }, + "features": { + "dcpEnabled": true + } +} \ No newline at end of file diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index 2b71319141c..f4128a9af40 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -278,10 +278,17 @@ private string MapInputTypeToTypeScript(AtsTypeRef? typeRef) { if (TryMapInterfaceInputTypeToTypeScript(typeRef!) is { } interfaceInputType) { - return interfaceInputType; + return $"{interfaceInputType} | PromiseLike<{interfaceInputType}>"; } - return GetHandleReferenceInterfaceName(); + var handleName = GetHandleReferenceInterfaceName(); + return $"{handleName} | PromiseLike<{handleName}>"; + } + + if (IsHandleType(typeRef) && _wrapperClassNames.TryGetValue(typeRef!.TypeId, out var className)) + { + var ifaceName = GetInterfaceName(className); + return $"{ifaceName} | PromiseLike<{ifaceName}>"; } if (IsCancellationTokenType(typeRef)) @@ -301,9 +308,25 @@ private string MapInputUnionTypeToTypeScript(AtsTypeRef typeRef) var memberTypes = typeRef.UnionTypes .Select(MapInputTypeToTypeScript) - .Distinct(); + .SelectMany(t => t.Split(" | ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) + .Distinct() + .ToList(); - return string.Join(" | ", memberTypes); + var baseTypes = memberTypes.Where(t => !t.StartsWith("PromiseLike<", StringComparison.Ordinal)).ToList(); + // Collect the handle types that had PromiseLike wrappers generated by MapInputTypeToTypeScript + var handleTypes = memberTypes + .Where(t => t.StartsWith("PromiseLike<", StringComparison.Ordinal)) + .Select(t => t["PromiseLike<".Length..^1]) // Extract inner type + .SelectMany(t => t.Split(" | ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) + .Distinct() + .ToList(); + + if (handleTypes.Count > 0) + { + return string.Join(" | ", baseTypes) + $" | PromiseLike<{string.Join(" | ", handleTypes)}>"; + } + + return string.Join(" | ", baseTypes); } /// @@ -424,9 +447,19 @@ private static bool IsInterfaceHandleType(AtsTypeRef? typeRef) private static bool IsCancellationTokenType(AtsTypeRef? typeRef) => typeRef?.TypeId == AtsConstants.CancellationToken; private static string GetRpcArgumentValueExpression(string parameterName, AtsTypeRef? typeRef) - => IsCancellationTokenType(typeRef) - ? $"CancellationToken.fromValue({parameterName})" - : parameterName; + { + if (IsCancellationTokenType(typeRef)) + { + return $"CancellationToken.fromValue({parameterName})"; + } + + if (IsHandleOrHandleUnionType(typeRef)) + { + return $"{parameterName}_resolved"; + } + + return parameterName; + } private static string GetRpcArgumentEntry(string parameterName, AtsTypeRef? typeRef) { @@ -525,7 +558,8 @@ private string GenerateAspireSdk(AtsContext context) CapabilityError, registerCallback, wrapIfHandle, - registerHandleWrapper + registerHandleWrapper, + isPromiseLike } from './transport.js'; import type { AspireClientRpc } from './transport.js'; @@ -1429,6 +1463,9 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab GenerateCallbackRegistration(callbackParam); } + // Resolve any promise-like handle parameters before building rpcArgs + GeneratePromiseResolution(capability.Parameters); + // Build args object with conditional inclusion GenerateArgsObjectWithConditionals(targetParamName, requiredParams, optionalParams); @@ -1466,6 +1503,15 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab GenerateCallbackRegistration(callbackParam); } + // Resolve any promise-like handle parameters before building rpcArgs + GeneratePromiseResolution(capability.Parameters); + + // Flush pending promises before build to ensure all un-awaited chains complete + if (capability.MethodName == "Build") + { + WriteLine(" await this._client.flushPendingPromises();"); + } + // Build args object with conditional inclusion GenerateArgsObjectWithConditionals(targetParamName, requiredParams, optionalParams); @@ -1507,11 +1553,53 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab var allParamNames = capability.Parameters.Select(p => p.Name); Write($" return new {promiseImplementationClass}(this.{internalMethodName}("); Write(string.Join(", ", allParamNames)); - WriteLine("));"); + WriteLine("), this._client);"); WriteLine(" }"); WriteLine(); } + /// + /// Generates promise resolution code for handle-type parameters that may be PromiseLike. + /// + private void GeneratePromiseResolution(IReadOnlyList parameters) + { + foreach (var param in parameters) + { + if (param.IsCallback) + { + continue; + } + + if (IsHandleOrHandleUnionType(param.Type)) + { + WriteLine($" const {param.Name}_resolved = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); + } + } + } + + /// + /// Checks if a type is a handle type or a union containing handle types. + /// + private static bool IsHandleOrHandleUnionType(AtsTypeRef? typeRef) + { + if (typeRef == null) + { + return false; + } + + if (IsHandleType(typeRef)) + { + return true; + } + + if (typeRef.Category == AtsTypeCategory.Union && typeRef.UnionTypes is { Count: > 0 }) + { + return typeRef.UnionTypes.Any(IsHandleOrHandleUnionType); + } + + return false; + } + /// /// Generates an args object with conditional inclusion of optional parameters. /// @@ -1557,7 +1645,9 @@ private void GenerateThenableClass(BuilderModel builder) WriteLine($" * await builder.addSomething().withX().withY();"); WriteLine($" */"); WriteLine($"class {promiseImplementationClass} implements {promiseClass} {{"); - WriteLine($" constructor(private _promise: Promise<{builder.BuilderClassName}>) {{}}"); + WriteLine($" constructor(private _promise: Promise<{builder.BuilderClassName}>, private _client: AspireClientRpc) {{"); + WriteLine($" _client.trackPromise(_promise);"); + WriteLine($" }}"); WriteLine(); // Generate then() for PromiseLike interface @@ -1646,7 +1736,7 @@ private void GenerateThenableClass(BuilderModel builder) // Forward to the public method on the underlying object, wrapping result in promise class Write($" return new {methodPromiseImplementationClass}(this._promise.then(obj => obj.{methodName}("); Write(argsString); - WriteLine(")));"); + WriteLine($")), this._client);"); WriteLine(" }"); } WriteLine(); @@ -2675,6 +2765,9 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab GenerateCallbackRegistration(callbackParam); } + // Resolve any promise-like handle parameters + GeneratePromiseResolution(userParams); + // Build args with conditional inclusion GenerateArgsObjectWithConditionals(targetParamName, requiredParams, optionalParams); @@ -2699,7 +2792,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab Write($" return new {returnPromiseImplementationClass}(this.{internalMethodName}("); Write(string.Join(", ", userParams.Select(p => p.Name))); - WriteLine("));"); + WriteLine("), this._client);"); WriteLine(" }"); } else if (isVoid) @@ -2718,6 +2811,9 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab GenerateCallbackRegistration(callbackParam); } + // Resolve any promise-like handle parameters + GeneratePromiseResolution(userParams); + // Build args with conditional inclusion GenerateArgsObjectWithConditionals(targetParamName, requiredParams, optionalParams); @@ -2742,7 +2838,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab Write($" return new {promiseImplementationClass}(this.{internalMethodName}("); Write(string.Join(", ", userParams.Select(p => p.Name))); - WriteLine("));"); + WriteLine("), this._client);"); WriteLine(" }"); } else @@ -2765,6 +2861,9 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab GenerateCallbackRegistration(callbackParam); } + // Resolve any promise-like handle parameters + GeneratePromiseResolution(userParams); + // Build args with conditional inclusion GenerateArgsObjectWithConditionals(targetParamName, requiredParams, optionalParams); @@ -2801,7 +2900,9 @@ private void GenerateTypeClassThenableWrapper(BuilderModel model, List) {{}}"); + WriteLine($" constructor(private _promise: Promise<{className}>, private _client: AspireClientRpc) {{"); + WriteLine($" _client.trackPromise(_promise);"); + WriteLine($" }}"); WriteLine(); // Generate then() for PromiseLike interface @@ -2871,7 +2972,7 @@ private void GenerateTypeClassThenableWrapper(BuilderModel model, List obj.{methodName}("); Write(argsString); - WriteLine(")));"); + WriteLine($")), this._client);"); WriteLine(" }"); } else if (isVoid) @@ -2882,7 +2983,7 @@ private void GenerateTypeClassThenableWrapper(BuilderModel model, List obj.{methodName}("); Write(argsString); - WriteLine(")));"); + WriteLine($")), this._client);"); WriteLine(" }"); } else diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts index 01233e6f1d6..b877bda9c91 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts @@ -14,6 +14,8 @@ export interface AspireClientRpc { readonly connected: boolean; invokeCapability(capabilityId: string, args?: Record): Promise; cancelToken(cancellationId: string): Promise; + trackPromise(promise: Promise): void; + flushPendingPromises(): Promise; } /** @@ -383,7 +385,7 @@ export class AppHostUsageError extends Error { } } -function isPromiseLike(value: unknown): value is PromiseLike { +export function isPromiseLike(value: unknown): value is PromiseLike { return ( value !== null && (typeof value === 'object' || typeof value === 'function') && @@ -753,9 +755,24 @@ export class AspireClient implements AspireClientRpc { private _pendingCalls = 0; private _connectPromise: Promise | null = null; private _disconnectNotified = false; + private _pendingPromises: Set> = new Set(); constructor(private socketPath: string) { } + trackPromise(promise: Promise): void { + this._pendingPromises.add(promise); + promise.then( + () => this._pendingPromises.delete(promise), + () => this._pendingPromises.delete(promise) + ); + } + + async flushPendingPromises(): Promise { + while (this._pendingPromises.size > 0) { + await Promise.all(this._pendingPromises); + } + } + /** * Register a callback to be called when the connection is lost */ diff --git a/src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs b/src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs new file mode 100644 index 00000000000..1aeb17945fb --- /dev/null +++ b/src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs @@ -0,0 +1,71 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Aspire.Hosting.ApplicationModel; + +/// +/// Provides diagnostics for references that require a published runtime which was not generated. +/// +public static class PublishedRuntimeReferenceDiagnostic +{ + /// + /// Creates an actionable error message for a resource reference that could not be resolved for the specified publish target. + /// + /// The distributed application model. + /// The referenced resource that could not be resolved. + /// The publish target name to include in the message. + /// An actionable error message. + /// + /// There are a few common reasons why a resource reference can be missing at publish time: + /// + /// + /// The resource was explicitly excluded from publish. In that case, the reference should be marked optional if the exclusion is intentional. + /// + /// + /// The resource is build-only and does not publish a runtime. In that case, runtime references should be removed and the resource should only be used as a build artifact. + /// + /// + /// The resource is build-only and nothing consumes its published output. In that case, either remove the runtime reference or wire the output into another resource with PublishWithContainerFiles(...). + /// + /// + /// Any remaining cases fall back to a generic "not published to this target" message. + /// + public static string GetMissingPublishedRuntimeReferenceMessage(this DistributedApplicationModel model, IResource referencedResource, string publisherName) + { + ArgumentNullException.ThrowIfNull(model); + ArgumentNullException.ThrowIfNull(referencedResource); + ArgumentException.ThrowIfNullOrEmpty(publisherName); + + if (referencedResource.IsExcludedFromPublish()) + { + return $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but it was excluded from publish. If that exclusion is intentional, mark the reference optional."; + } + + if (referencedResource.IsBuildOnlyContainer()) + { + return HasContainerFilesConsumer(model, referencedResource) + ? $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but it does not publish a runtime. It is a build-only resource. Remove the runtime reference and use it only as a build artifact." + : $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but it does not publish a runtime. It is a build-only resource, and nothing consumes its published output. Remove the runtime reference, or wire its output into another resource with PublishWithContainerFiles(...)."; + } + + return $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but no published runtime was generated for it in that environment. Ensure the resource is published to the same target, or remove the runtime reference."; + } + + private static bool HasContainerFilesConsumer(DistributedApplicationModel model, IResource referencedResource) + { + foreach (var resource in model.Resources) + { + if (!resource.TryGetAnnotationsOfType(out var destinations)) + { + continue; + } + + if (destinations.Any(destination => destination.Source == referencedResource)) + { + return true; + } + } + + return false; + } +} diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs index ec2af5d0102..9816c41a3df 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs @@ -591,7 +591,7 @@ public void Pattern4_InterfaceParameterType_GeneratesUnionType() var files = _generator.GenerateDistributedApplication(atsContext); var aspireTs = files["aspire.ts"]; - Assert.Contains("withDependency(dependency: ResourceWithConnectionString | TestRedisResource)", aspireTs); + Assert.Contains("withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike)", aspireTs); Assert.DoesNotContain("withDependency(dependency: HandleReference)", aspireTs); } @@ -603,7 +603,7 @@ public void AspireUnion_InterfaceHandleInput_GeneratesExpandedUnion() var files = _generator.GenerateDistributedApplication(atsContext); var aspireTs = files["aspire.ts"]; - Assert.Contains("withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource)", aspireTs); + Assert.Contains("withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike)", aspireTs); } [Fact] diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts index 5fc84bbce82..3db0ebbb960 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts @@ -13,7 +13,8 @@ import { CapabilityError, registerCallback, wrapIfHandle, - registerHandleWrapper + registerHandleWrapper, + isPromiseLike } from './transport.js'; import type { AspireClientRpc } from './transport.js'; @@ -474,7 +475,7 @@ class TestResourceContextImpl implements TestResourceContext { } setValueAsync(value: string): TestResourceContextPromise { - return new TestResourceContextPromiseImpl(this._setValueAsyncInternal(value)); + return new TestResourceContextPromiseImpl(this._setValueAsyncInternal(value), this._client); } /** Invokes the ValidateAsync method */ @@ -492,7 +493,9 @@ class TestResourceContextImpl implements TestResourceContext { * Thenable wrapper for TestResourceContext that enables fluent chaining. */ class TestResourceContextPromiseImpl implements TestResourceContextPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestResourceContext) => TResult1 | PromiseLike) | null, @@ -508,7 +511,7 @@ class TestResourceContextPromiseImpl implements TestResourceContextPromise { /** Invokes the SetValueAsync method */ setValueAsync(value: string): TestResourceContextPromise { - return new TestResourceContextPromiseImpl(this._promise.then(obj => obj.setValueAsync(value))); + return new TestResourceContextPromiseImpl(this._promise.then(obj => obj.setValueAsync(value)), this._client); } /** Invokes the ValidateAsync method */ @@ -560,7 +563,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { const port = options?.port; - return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port)); + return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port), this._client); } /** Adds a test vault resource */ @@ -575,7 +578,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addTestVault(name: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._addTestVaultInternal(name)); + return new TestVaultResourcePromiseImpl(this._addTestVaultInternal(name), this._client); } } @@ -584,7 +587,9 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder * Thenable wrapper for DistributedApplicationBuilder that enables fluent chaining. */ class DistributedApplicationBuilderPromiseImpl implements DistributedApplicationBuilderPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: DistributedApplicationBuilder) => TResult1 | PromiseLike) | null, @@ -595,12 +600,12 @@ class DistributedApplicationBuilderPromiseImpl implements DistributedApplication /** Adds a test Redis resource */ addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.addTestRedis(name, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.addTestRedis(name, options)), this._client); } /** Adds a test vault resource */ addTestVault(name: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.addTestVault(name))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.addTestVault(name)), this._client); } } @@ -621,9 +626,9 @@ export interface TestDatabaseResource { withStatus(status: TestResourceStatus): TestDatabaseResourcePromise; withNestedConfig(config: TestNestedDto): TestDatabaseResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -649,9 +654,9 @@ export interface TestDatabaseResourcePromise extends PromiseLike Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -691,7 +696,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -741,7 +746,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withValidatorInternal(validator)); + return new TestDatabaseResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -857,13 +863,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -872,13 +879,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -887,8 +895,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -903,7 +911,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new TestDatabaseResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -937,7 +945,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new TestDatabaseResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -954,7 +962,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestDatabaseResource) => TResult1 | PromiseLike) | null, @@ -1104,127 +1114,127 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a data volume */ withDataVolume(options?: WithDataVolumeOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDataVolume(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDataVolume(options)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -1250,12 +1260,12 @@ export interface TestRedisResource { withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -1289,12 +1299,12 @@ export interface TestRedisResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -1335,7 +1345,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { const databaseName = options?.databaseName; - return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName)); + return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName), this._client); } /** @internal */ @@ -1352,7 +1362,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { const mode = options?.mode; - return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode)); + return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode), this._client); } /** @internal */ @@ -1371,7 +1381,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -1386,7 +1396,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConfigInternal(config)); + return new TestRedisResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** Gets the tags for the resource */ @@ -1409,7 +1419,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionStringInternal(connectionString: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, connectionString }; + const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -1419,7 +1430,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the connection string using a reference expression */ withConnectionString(connectionString: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConnectionStringInternal(connectionString)); + return new TestRedisResourcePromiseImpl(this._withConnectionStringInternal(connectionString), this._client); } /** @internal */ @@ -1439,7 +1450,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -1454,7 +1465,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new TestRedisResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -1469,7 +1480,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new TestRedisResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -1484,7 +1495,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new TestRedisResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -1506,7 +1517,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { const callback = options?.callback; - return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -1521,7 +1532,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the resource status */ withStatus(status: TestResourceStatus): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withStatusInternal(status)); + return new TestRedisResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -1536,7 +1547,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new TestRedisResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -1556,12 +1567,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withValidatorInternal(validator)); + return new TestRedisResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -1570,8 +1582,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** Gets the endpoints */ @@ -1595,7 +1607,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets connection string using direct interface target */ withConnectionStringDirect(connectionString: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConnectionStringDirectInternal(connectionString)); + return new TestRedisResourcePromiseImpl(this._withConnectionStringDirectInternal(connectionString), this._client); } /** @internal */ @@ -1610,12 +1622,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Redis-specific configuration */ withRedisSpecific(option: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withRedisSpecificInternal(option)); + return new TestRedisResourcePromiseImpl(this._withRedisSpecificInternal(option), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -1624,13 +1637,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -1639,8 +1653,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -1655,7 +1669,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new TestRedisResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -1670,7 +1684,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new TestRedisResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** Gets the status of the resource asynchronously */ @@ -1700,7 +1714,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new TestRedisResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** Waits for the resource to be ready */ @@ -1733,7 +1747,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Tests multi-param callback destructuring */ withMultiParamHandleCallback(callback: (arg1: TestCallbackContext, arg2: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMultiParamHandleCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withMultiParamHandleCallbackInternal(callback), this._client); } /** @internal */ @@ -1752,7 +1766,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { const name = options?.name; const isReadOnly = options?.isReadOnly; - return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly)); + return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly), this._client); } /** @internal */ @@ -1767,7 +1781,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a label to the resource */ withMergeLabel(label: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new TestRedisResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -1782,7 +1796,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new TestRedisResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -1797,7 +1811,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new TestRedisResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -1812,7 +1826,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new TestRedisResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -1831,7 +1845,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -1850,7 +1864,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -1865,7 +1879,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new TestRedisResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -1880,7 +1894,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new TestRedisResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -1891,7 +1905,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestRedisResource) => TResult1 | PromiseLike) | null, @@ -1902,22 +1918,22 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.addTestChildDatabase(name, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.addTestChildDatabase(name, options)), this._client); } /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPersistence(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPersistence(options)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Gets the tags for the resource */ @@ -1932,52 +1948,52 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Sets the connection string using a reference expression */ withConnectionString(connectionString: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Gets the endpoints */ @@ -1987,32 +2003,32 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Sets connection string using direct interface target */ withConnectionStringDirect(connectionString: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString)), this._client); } /** Redis-specific configuration */ withRedisSpecific(option: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRedisSpecific(option))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRedisSpecific(option)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Gets the status of the resource asynchronously */ @@ -2022,7 +2038,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Waits for the resource to be ready */ @@ -2032,52 +2048,52 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Tests multi-param callback destructuring */ withMultiParamHandleCallback(callback: (arg1: TestCallbackContext, arg2: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMultiParamHandleCallback(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMultiParamHandleCallback(callback)), this._client); } /** Adds a data volume with persistence */ withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDataVolume(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDataVolume(options)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -2098,9 +2114,9 @@ export interface TestVaultResource { withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -2126,9 +2142,9 @@ export interface TestVaultResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -2168,7 +2184,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -2183,7 +2199,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withConfigInternal(config)); + return new TestVaultResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -2203,7 +2219,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new TestVaultResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -2218,7 +2234,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new TestVaultResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -2233,7 +2249,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new TestVaultResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -2248,7 +2264,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new TestVaultResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -2270,7 +2286,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { const callback = options?.callback; - return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -2285,7 +2301,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the resource status */ withStatus(status: TestResourceStatus): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withStatusInternal(status)); + return new TestVaultResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -2300,7 +2316,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new TestVaultResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -2320,12 +2336,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withValidatorInternal(validator)); + return new TestVaultResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -2334,13 +2351,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -2349,13 +2367,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -2364,8 +2383,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -2380,7 +2399,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new TestVaultResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -2395,7 +2414,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new TestVaultResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -2414,7 +2433,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new TestVaultResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -2429,7 +2448,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures vault using direct interface target */ withVaultDirect(option: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withVaultDirectInternal(option)); + return new TestVaultResourcePromiseImpl(this._withVaultDirectInternal(option), this._client); } /** @internal */ @@ -2444,7 +2463,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a label to the resource */ withMergeLabel(label: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new TestVaultResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -2459,7 +2478,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new TestVaultResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -2474,7 +2493,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new TestVaultResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -2489,7 +2508,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new TestVaultResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -2508,7 +2527,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -2527,7 +2546,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -2542,7 +2561,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new TestVaultResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -2557,7 +2576,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new TestVaultResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -2568,7 +2587,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestVaultResource) => TResult1 | PromiseLike) | null, @@ -2579,127 +2600,127 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Configures vault using direct interface target */ withVaultDirect(option: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withVaultDirect(option))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withVaultDirect(option)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -2719,9 +2740,9 @@ export interface Resource { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): ResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): ResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -2744,9 +2765,9 @@ export interface ResourcePromise extends PromiseLike { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): ResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): ResourcePromise; + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -2784,7 +2805,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -2799,7 +2820,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ResourcePromise { - return new ResourcePromiseImpl(this._withConfigInternal(config)); + return new ResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -2814,7 +2835,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the created timestamp */ withCreatedAt(createdAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new ResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -2829,7 +2850,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new ResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -2844,7 +2865,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the correlation ID */ withCorrelationId(correlationId: string): ResourcePromise { - return new ResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new ResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -2866,7 +2887,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { const callback = options?.callback; - return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -2881,7 +2902,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the resource status */ withStatus(status: TestResourceStatus): ResourcePromise { - return new ResourcePromiseImpl(this._withStatusInternal(status)); + return new ResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -2896,7 +2917,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ResourcePromise { - return new ResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new ResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -2916,12 +2937,13 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -2930,13 +2952,14 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -2945,13 +2968,14 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -2960,8 +2984,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -2976,7 +3000,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the endpoints */ withEndpoints(endpoints: string[]): ResourcePromise { - return new ResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new ResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -2995,7 +3019,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -3010,7 +3034,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a label to the resource */ withMergeLabel(label: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new ResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -3025,7 +3049,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new ResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -3040,7 +3064,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new ResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -3055,7 +3079,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new ResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -3074,7 +3098,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -3093,7 +3117,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -3108,7 +3132,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new ResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -3123,7 +3147,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new ResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -3134,7 +3158,9 @@ class ResourceImpl extends ResourceBuilderBase implements Resou * await builder.addSomething().withX().withY(); */ class ResourcePromiseImpl implements ResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: Resource) => TResult1 | PromiseLike) | null, @@ -3145,112 +3171,112 @@ class ResourcePromiseImpl implements ResourcePromise { /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -3281,7 +3307,8 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, connectionString }; + const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -3291,7 +3318,7 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithConnectionString) => TResult1 | PromiseLike) | null, @@ -3328,12 +3357,12 @@ class ResourceWithConnectionStringPromiseImpl implements ResourceWithConnectionS /** Sets the connection string using a reference expression */ withConnectionString(connectionString: ReferenceExpression): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString)), this._client); } /** Sets connection string using direct interface target */ withConnectionStringDirect(connectionString: string): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString)), this._client); } } @@ -3379,7 +3408,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase Promise): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new ResourceWithEnvironmentPromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -3394,7 +3423,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } } @@ -3405,7 +3434,9 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithEnvironment) => TResult1 | PromiseLike) | null, @@ -3416,12 +3447,12 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } } diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts index 03c76b21116..ff653c634c8 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts @@ -13,7 +13,8 @@ import { CapabilityError, registerCallback, wrapIfHandle, - registerHandleWrapper + registerHandleWrapper, + isPromiseLike } from './transport.js'; import type { AspireClientRpc } from './transport.js'; @@ -456,7 +457,7 @@ export interface AddContainerRegistryFromStringOptions { } export interface AddContainerRegistryOptions { - repository?: ParameterResource; + repository?: ParameterResource | PromiseLike; } export interface AddDockerfileOptions { @@ -635,7 +636,7 @@ export interface WithHttpProbeOptions { } export interface WithHttpsDeveloperCertificateOptions { - password?: ParameterResource; + password?: ParameterResource | PromiseLike; } export interface WithHttpsEndpointOptions { @@ -877,11 +878,11 @@ export interface CommandLineArgsCallbackContext { }; executionContext: { get: () => Promise; - set: (value: DistributedApplicationExecutionContext) => Promise; + set: (value: DistributedApplicationExecutionContext | PromiseLike) => Promise; }; logger: { get: () => Promise; - set: (value: Logger) => Promise; + set: (value: Logger | PromiseLike) => Promise; }; resource: { get: () => Promise; @@ -935,10 +936,10 @@ class CommandLineArgsCallbackContextImpl implements CommandLineArgsCallbackConte ); return new DistributedApplicationExecutionContextImpl(handle, this._client); }, - set: async (value: DistributedApplicationExecutionContext): Promise => { + set: async (value: DistributedApplicationExecutionContext | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/CommandLineArgsCallbackContext.setExecutionContext', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -952,10 +953,10 @@ class CommandLineArgsCallbackContextImpl implements CommandLineArgsCallbackConte ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger): Promise => { + set: async (value: Logger | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/CommandLineArgsCallbackContext.setLogger', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -1064,7 +1065,7 @@ class DistributedApplicationImpl implements DistributedApplication { run(options?: RunOptions): DistributedApplicationPromise { const cancellationToken = options?.cancellationToken; - return new DistributedApplicationPromiseImpl(this._runInternal(cancellationToken)); + return new DistributedApplicationPromiseImpl(this._runInternal(cancellationToken), this._client); } } @@ -1073,7 +1074,9 @@ class DistributedApplicationImpl implements DistributedApplication { * Thenable wrapper for DistributedApplication that enables fluent chaining. */ class DistributedApplicationPromiseImpl implements DistributedApplicationPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: DistributedApplication) => TResult1 | PromiseLike) | null, @@ -1084,7 +1087,7 @@ class DistributedApplicationPromiseImpl implements DistributedApplicationPromise /** Runs the distributed application */ run(options?: RunOptions): DistributedApplicationPromise { - return new DistributedApplicationPromiseImpl(this._promise.then(obj => obj.run(options))); + return new DistributedApplicationPromiseImpl(this._promise.then(obj => obj.run(options)), this._client); } } @@ -1234,7 +1237,7 @@ class DistributedApplicationModelImpl implements DistributedApplicationModel { } findResourceByName(name: string): ResourcePromise { - return new ResourcePromiseImpl(this._findResourceByNameInternal(name)); + return new ResourcePromiseImpl(this._findResourceByNameInternal(name), this._client); } } @@ -1243,7 +1246,9 @@ class DistributedApplicationModelImpl implements DistributedApplicationModel { * Thenable wrapper for DistributedApplicationModel that enables fluent chaining. */ class DistributedApplicationModelPromiseImpl implements DistributedApplicationModelPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: DistributedApplicationModel) => TResult1 | PromiseLike) | null, @@ -1259,7 +1264,7 @@ class DistributedApplicationModelPromiseImpl implements DistributedApplicationMo /** Finds a resource by name */ findResourceByName(name: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.findResourceByName(name))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.findResourceByName(name)), this._client); } } @@ -1495,7 +1500,9 @@ class EndpointReferenceImpl implements EndpointReference { /** Gets a conditional expression that resolves to the enabledValue when TLS is enabled on the endpoint, or to the disabledValue otherwise. */ async getTlsValue(enabledValue: ReferenceExpression, disabledValue: ReferenceExpression): Promise { - const rpcArgs: Record = { context: this._handle, enabledValue, disabledValue }; + const enabledValue_resolved = isPromiseLike(enabledValue) ? await enabledValue : enabledValue; + const disabledValue_resolved = isPromiseLike(disabledValue) ? await disabledValue : disabledValue; + const rpcArgs: Record = { context: this._handle, enabledValue: enabledValue_resolved, disabledValue: disabledValue_resolved }; return await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/EndpointReference.getTlsValue', rpcArgs @@ -1508,7 +1515,9 @@ class EndpointReferenceImpl implements EndpointReference { * Thenable wrapper for EndpointReference that enables fluent chaining. */ class EndpointReferencePromiseImpl implements EndpointReferencePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: EndpointReference) => TResult1 | PromiseLike) | null, @@ -1604,7 +1613,7 @@ export interface EnvironmentCallbackContext { }; logger: { get: () => Promise; - set: (value: Logger) => Promise; + set: (value: Logger | PromiseLike) => Promise; }; resource: { get: () => Promise; @@ -1661,10 +1670,10 @@ class EnvironmentCallbackContextImpl implements EnvironmentCallbackContext { ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger): Promise => { + set: async (value: Logger | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/EnvironmentCallbackContext.setLogger', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -1701,7 +1710,7 @@ export interface ExecuteCommandContext { toJSON(): MarshalledHandle; serviceProvider: { get: () => Promise; - set: (value: ServiceProvider) => Promise; + set: (value: ServiceProvider | PromiseLike) => Promise; }; resourceName: { get: () => Promise; @@ -1713,7 +1722,7 @@ export interface ExecuteCommandContext { }; logger: { get: () => Promise; - set: (value: Logger) => Promise; + set: (value: Logger | PromiseLike) => Promise; }; } @@ -1739,10 +1748,10 @@ class ExecuteCommandContextImpl implements ExecuteCommandContext { ); return new ServiceProviderImpl(handle, this._client); }, - set: async (value: ServiceProvider): Promise => { + set: async (value: ServiceProvider | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ExecuteCommandContext.setServiceProvider', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -1789,10 +1798,10 @@ class ExecuteCommandContextImpl implements ExecuteCommandContext { ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger): Promise => { + set: async (value: Logger | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ExecuteCommandContext.setLogger', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -1900,7 +1909,7 @@ export interface PipelineConfigurationContext { toJSON(): MarshalledHandle; services: { get: () => Promise; - set: (value: ServiceProvider) => Promise; + set: (value: ServiceProvider | PromiseLike) => Promise; }; steps: { get: () => Promise; @@ -1908,7 +1917,7 @@ export interface PipelineConfigurationContext { }; model: { get: () => Promise; - set: (value: DistributedApplicationModel) => Promise; + set: (value: DistributedApplicationModel | PromiseLike) => Promise; }; getStepsByTag(tag: string): Promise; } @@ -1939,10 +1948,10 @@ class PipelineConfigurationContextImpl implements PipelineConfigurationContext { ); return new ServiceProviderImpl(handle, this._client); }, - set: async (value: ServiceProvider): Promise => { + set: async (value: ServiceProvider | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineConfigurationContext.setServices', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -1972,10 +1981,10 @@ class PipelineConfigurationContextImpl implements PipelineConfigurationContext { ); return new DistributedApplicationModelImpl(handle, this._client); }, - set: async (value: DistributedApplicationModel): Promise => { + set: async (value: DistributedApplicationModel | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineConfigurationContext.setModel', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -1995,7 +2004,9 @@ class PipelineConfigurationContextImpl implements PipelineConfigurationContext { * Thenable wrapper for PipelineConfigurationContext that enables fluent chaining. */ class PipelineConfigurationContextPromiseImpl implements PipelineConfigurationContextPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: PipelineConfigurationContext) => TResult1 | PromiseLike) | null, @@ -2144,7 +2155,7 @@ export interface PipelineStep { readonly tags: AspireList; resource: { get: () => Promise; - set: (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource) => Promise; + set: (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike) => Promise; }; dependsOn(stepName: string): PipelineStepPromise; requiredBy(stepName: string): PipelineStepPromise; @@ -2251,10 +2262,10 @@ class PipelineStepImpl implements PipelineStep { ); return new ResourceImpl(handle, this._client); }, - set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise => { + set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStep.setResource', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -2271,7 +2282,7 @@ class PipelineStepImpl implements PipelineStep { } dependsOn(stepName: string): PipelineStepPromise { - return new PipelineStepPromiseImpl(this._dependsOnInternal(stepName)); + return new PipelineStepPromiseImpl(this._dependsOnInternal(stepName), this._client); } /** Specifies that another step requires this step by name */ @@ -2286,7 +2297,7 @@ class PipelineStepImpl implements PipelineStep { } requiredBy(stepName: string): PipelineStepPromise { - return new PipelineStepPromiseImpl(this._requiredByInternal(stepName)); + return new PipelineStepPromiseImpl(this._requiredByInternal(stepName), this._client); } } @@ -2295,7 +2306,9 @@ class PipelineStepImpl implements PipelineStep { * Thenable wrapper for PipelineStep that enables fluent chaining. */ class PipelineStepPromiseImpl implements PipelineStepPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: PipelineStep) => TResult1 | PromiseLike) | null, @@ -2306,12 +2319,12 @@ class PipelineStepPromiseImpl implements PipelineStepPromise { /** Adds a dependency on another step by name */ dependsOn(stepName: string): PipelineStepPromise { - return new PipelineStepPromiseImpl(this._promise.then(obj => obj.dependsOn(stepName))); + return new PipelineStepPromiseImpl(this._promise.then(obj => obj.dependsOn(stepName)), this._client); } /** Specifies that another step requires this step by name */ requiredBy(stepName: string): PipelineStepPromise { - return new PipelineStepPromiseImpl(this._promise.then(obj => obj.requiredBy(stepName))); + return new PipelineStepPromiseImpl(this._promise.then(obj => obj.requiredBy(stepName)), this._client); } } @@ -2324,11 +2337,11 @@ export interface PipelineStepContext { toJSON(): MarshalledHandle; pipelineContext: { get: () => Promise; - set: (value: PipelineContext) => Promise; + set: (value: PipelineContext | PromiseLike) => Promise; }; reportingStep: { get: () => Promise; - set: (value: ReportingStep) => Promise; + set: (value: ReportingStep | PromiseLike) => Promise; }; model: { get: () => Promise; @@ -2372,10 +2385,10 @@ class PipelineStepContextImpl implements PipelineStepContext { ); return new PipelineContextImpl(handle, this._client); }, - set: async (value: PipelineContext): Promise => { + set: async (value: PipelineContext | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepContext.setPipelineContext', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -2389,10 +2402,10 @@ class PipelineStepContextImpl implements PipelineStepContext { ); return new ReportingStepImpl(handle, this._client); }, - set: async (value: ReportingStep): Promise => { + set: async (value: ReportingStep | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepContext.setReportingStep', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -2473,11 +2486,11 @@ export interface PipelineStepFactoryContext { toJSON(): MarshalledHandle; pipelineContext: { get: () => Promise; - set: (value: PipelineContext) => Promise; + set: (value: PipelineContext | PromiseLike) => Promise; }; resource: { get: () => Promise; - set: (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource) => Promise; + set: (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike) => Promise; }; } @@ -2503,10 +2516,10 @@ class PipelineStepFactoryContextImpl implements PipelineStepFactoryContext { ); return new PipelineContextImpl(handle, this._client); }, - set: async (value: PipelineContext): Promise => { + set: async (value: PipelineContext | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepFactoryContext.setPipelineContext', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -2520,10 +2533,10 @@ class PipelineStepFactoryContextImpl implements PipelineStepFactoryContext { ); return new ResourceImpl(handle, this._client); }, - set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise => { + set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepFactoryContext.setResource', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -2570,7 +2583,7 @@ class PipelineSummaryImpl implements PipelineSummary { } add(key: string, value: string): PipelineSummaryPromise { - return new PipelineSummaryPromiseImpl(this._addInternal(key, value)); + return new PipelineSummaryPromiseImpl(this._addInternal(key, value), this._client); } /** Adds a Markdown-formatted value to the pipeline summary */ @@ -2585,7 +2598,7 @@ class PipelineSummaryImpl implements PipelineSummary { } addMarkdown(key: string, markdownString: string): PipelineSummaryPromise { - return new PipelineSummaryPromiseImpl(this._addMarkdownInternal(key, markdownString)); + return new PipelineSummaryPromiseImpl(this._addMarkdownInternal(key, markdownString), this._client); } } @@ -2594,7 +2607,9 @@ class PipelineSummaryImpl implements PipelineSummary { * Thenable wrapper for PipelineSummary that enables fluent chaining. */ class PipelineSummaryPromiseImpl implements PipelineSummaryPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: PipelineSummary) => TResult1 | PromiseLike) | null, @@ -2605,12 +2620,12 @@ class PipelineSummaryPromiseImpl implements PipelineSummaryPromise { /** Invokes the Add method */ add(key: string, value: string): PipelineSummaryPromise { - return new PipelineSummaryPromiseImpl(this._promise.then(obj => obj.add(key, value))); + return new PipelineSummaryPromiseImpl(this._promise.then(obj => obj.add(key, value)), this._client); } /** Adds a Markdown-formatted value to the pipeline summary */ addMarkdown(key: string, markdownString: string): PipelineSummaryPromise { - return new PipelineSummaryPromiseImpl(this._promise.then(obj => obj.addMarkdown(key, markdownString))); + return new PipelineSummaryPromiseImpl(this._promise.then(obj => obj.addMarkdown(key, markdownString)), this._client); } } @@ -2755,7 +2770,7 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { } appendLiteral(value: string): ReferenceExpressionBuilderPromise { - return new ReferenceExpressionBuilderPromiseImpl(this._appendLiteralInternal(value)); + return new ReferenceExpressionBuilderPromiseImpl(this._appendLiteralInternal(value), this._client); } /** Appends a formatted string value to the reference expression */ @@ -2772,7 +2787,7 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { appendFormatted(value: string, options?: AppendFormattedOptions): ReferenceExpressionBuilderPromise { const format = options?.format; - return new ReferenceExpressionBuilderPromiseImpl(this._appendFormattedInternal(value, format)); + return new ReferenceExpressionBuilderPromiseImpl(this._appendFormattedInternal(value, format), this._client); } /** Appends a value provider to the reference expression */ @@ -2789,7 +2804,7 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { appendValueProvider(valueProvider: any, options?: AppendValueProviderOptions): ReferenceExpressionBuilderPromise { const format = options?.format; - return new ReferenceExpressionBuilderPromiseImpl(this._appendValueProviderInternal(valueProvider, format)); + return new ReferenceExpressionBuilderPromiseImpl(this._appendValueProviderInternal(valueProvider, format), this._client); } /** Builds the reference expression */ @@ -2807,7 +2822,9 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { * Thenable wrapper for ReferenceExpressionBuilder that enables fluent chaining. */ class ReferenceExpressionBuilderPromiseImpl implements ReferenceExpressionBuilderPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ReferenceExpressionBuilder) => TResult1 | PromiseLike) | null, @@ -2818,17 +2835,17 @@ class ReferenceExpressionBuilderPromiseImpl implements ReferenceExpressionBuilde /** Appends a literal string to the reference expression */ appendLiteral(value: string): ReferenceExpressionBuilderPromise { - return new ReferenceExpressionBuilderPromiseImpl(this._promise.then(obj => obj.appendLiteral(value))); + return new ReferenceExpressionBuilderPromiseImpl(this._promise.then(obj => obj.appendLiteral(value)), this._client); } /** Appends a formatted string value to the reference expression */ appendFormatted(value: string, options?: AppendFormattedOptions): ReferenceExpressionBuilderPromise { - return new ReferenceExpressionBuilderPromiseImpl(this._promise.then(obj => obj.appendFormatted(value, options))); + return new ReferenceExpressionBuilderPromiseImpl(this._promise.then(obj => obj.appendFormatted(value, options)), this._client); } /** Appends a value provider to the reference expression */ appendValueProvider(valueProvider: any, options?: AppendValueProviderOptions): ReferenceExpressionBuilderPromise { - return new ReferenceExpressionBuilderPromiseImpl(this._promise.then(obj => obj.appendValueProvider(valueProvider, options))); + return new ReferenceExpressionBuilderPromiseImpl(this._promise.then(obj => obj.appendValueProvider(valueProvider, options)), this._client); } /** Builds the reference expression */ @@ -2895,12 +2912,12 @@ class ResourceEndpointsAllocatedEventImpl implements ResourceEndpointsAllocatedE export interface ResourceLoggerService { toJSON(): MarshalledHandle; - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceLoggerServicePromise; + completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise; completeLogByName(resourceName: string): ResourceLoggerServicePromise; } export interface ResourceLoggerServicePromise extends PromiseLike { - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceLoggerServicePromise; + completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise; completeLogByName(resourceName: string): ResourceLoggerServicePromise; } @@ -2919,8 +2936,9 @@ class ResourceLoggerServiceImpl implements ResourceLoggerService { /** Completes the log stream for a resource */ /** @internal */ - async _completeLogInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { loggerService: this._handle, resource }; + async _completeLogInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { loggerService: this._handle, resource: resource_resolved }; await this._client.invokeCapability( 'Aspire.Hosting/completeLog', rpcArgs @@ -2928,8 +2946,8 @@ class ResourceLoggerServiceImpl implements ResourceLoggerService { return this; } - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceLoggerServicePromise { - return new ResourceLoggerServicePromiseImpl(this._completeLogInternal(resource)); + completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise { + return new ResourceLoggerServicePromiseImpl(this._completeLogInternal(resource), this._client); } /** Completes the log stream by resource name */ @@ -2944,7 +2962,7 @@ class ResourceLoggerServiceImpl implements ResourceLoggerService { } completeLogByName(resourceName: string): ResourceLoggerServicePromise { - return new ResourceLoggerServicePromiseImpl(this._completeLogByNameInternal(resourceName)); + return new ResourceLoggerServicePromiseImpl(this._completeLogByNameInternal(resourceName), this._client); } } @@ -2953,7 +2971,9 @@ class ResourceLoggerServiceImpl implements ResourceLoggerService { * Thenable wrapper for ResourceLoggerService that enables fluent chaining. */ class ResourceLoggerServicePromiseImpl implements ResourceLoggerServicePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceLoggerService) => TResult1 | PromiseLike) | null, @@ -2963,13 +2983,13 @@ class ResourceLoggerServicePromiseImpl implements ResourceLoggerServicePromise { } /** Completes the log stream for a resource */ - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceLoggerServicePromise { - return new ResourceLoggerServicePromiseImpl(this._promise.then(obj => obj.completeLog(resource))); + completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise { + return new ResourceLoggerServicePromiseImpl(this._promise.then(obj => obj.completeLog(resource)), this._client); } /** Completes the log stream by resource name */ completeLogByName(resourceName: string): ResourceLoggerServicePromise { - return new ResourceLoggerServicePromiseImpl(this._promise.then(obj => obj.completeLogByName(resourceName))); + return new ResourceLoggerServicePromiseImpl(this._promise.then(obj => obj.completeLogByName(resourceName)), this._client); } } @@ -2983,18 +3003,18 @@ export interface ResourceNotificationService { waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise; waitForResourceStates(resourceName: string, targetStates: string[]): Promise; waitForResourceHealthy(resourceName: string): Promise; - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceNotificationServicePromise; + waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise; tryGetResourceState(resourceName: string): Promise; - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; + publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; } export interface ResourceNotificationServicePromise extends PromiseLike { waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise; waitForResourceStates(resourceName: string, targetStates: string[]): Promise; waitForResourceHealthy(resourceName: string): Promise; - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceNotificationServicePromise; + waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise; tryGetResourceState(resourceName: string): Promise; - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; + publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; } // ============================================================================ @@ -3024,7 +3044,7 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise { const targetState = options?.targetState; - return new ResourceNotificationServicePromiseImpl(this._waitForResourceStateInternal(resourceName, targetState)); + return new ResourceNotificationServicePromiseImpl(this._waitForResourceStateInternal(resourceName, targetState), this._client); } /** Waits for a resource to reach one of the specified states */ @@ -3047,8 +3067,9 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { /** Waits for all dependencies of a resource to be ready */ /** @internal */ - async _waitForDependenciesInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { notificationService: this._handle, resource }; + async _waitForDependenciesInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { notificationService: this._handle, resource: resource_resolved }; await this._client.invokeCapability( 'Aspire.Hosting/waitForDependencies', rpcArgs @@ -3056,8 +3077,8 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { return this; } - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceNotificationServicePromise { - return new ResourceNotificationServicePromiseImpl(this._waitForDependenciesInternal(resource)); + waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise { + return new ResourceNotificationServicePromiseImpl(this._waitForDependenciesInternal(resource), this._client); } /** Tries to get the current state of a resource */ @@ -3071,8 +3092,9 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { /** Publishes an update for a resource's state */ /** @internal */ - async _publishResourceUpdateInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, state?: string, stateStyle?: string): Promise { - const rpcArgs: Record = { notificationService: this._handle, resource }; + async _publishResourceUpdateInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, state?: string, stateStyle?: string): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { notificationService: this._handle, resource: resource_resolved }; if (state !== undefined) rpcArgs.state = state; if (stateStyle !== undefined) rpcArgs.stateStyle = stateStyle; await this._client.invokeCapability( @@ -3082,10 +3104,10 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { return this; } - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { + publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { const state = options?.state; const stateStyle = options?.stateStyle; - return new ResourceNotificationServicePromiseImpl(this._publishResourceUpdateInternal(resource, state, stateStyle)); + return new ResourceNotificationServicePromiseImpl(this._publishResourceUpdateInternal(resource, state, stateStyle), this._client); } } @@ -3094,7 +3116,9 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { * Thenable wrapper for ResourceNotificationService that enables fluent chaining. */ class ResourceNotificationServicePromiseImpl implements ResourceNotificationServicePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceNotificationService) => TResult1 | PromiseLike) | null, @@ -3105,7 +3129,7 @@ class ResourceNotificationServicePromiseImpl implements ResourceNotificationServ /** Waits for a resource to reach a specified state */ waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise { - return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.waitForResourceState(resourceName, options))); + return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.waitForResourceState(resourceName, options)), this._client); } /** Waits for a resource to reach one of the specified states */ @@ -3119,8 +3143,8 @@ class ResourceNotificationServicePromiseImpl implements ResourceNotificationServ } /** Waits for all dependencies of a resource to be ready */ - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceNotificationServicePromise { - return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.waitForDependencies(resource))); + waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise { + return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.waitForDependencies(resource)), this._client); } /** Tries to get the current state of a resource */ @@ -3129,8 +3153,8 @@ class ResourceNotificationServicePromiseImpl implements ResourceNotificationServ } /** Publishes an update for a resource's state */ - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { - return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.publishResourceUpdate(resource, options))); + publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { + return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.publishResourceUpdate(resource, options)), this._client); } } @@ -3252,7 +3276,7 @@ export interface ResourceUrlsCallbackContext { }; logger: { get: () => Promise; - set: (value: Logger) => Promise; + set: (value: Logger | PromiseLike) => Promise; }; executionContext: { get: () => Promise; @@ -3317,10 +3341,10 @@ class ResourceUrlsCallbackContextImpl implements ResourceUrlsCallbackContext { ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger): Promise => { + set: async (value: Logger | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ResourceUrlsCallbackContext.setLogger', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -3649,7 +3673,7 @@ class TestResourceContextImpl implements TestResourceContext { } setValueAsync(value: string): TestResourceContextPromise { - return new TestResourceContextPromiseImpl(this._setValueAsyncInternal(value)); + return new TestResourceContextPromiseImpl(this._setValueAsyncInternal(value), this._client); } /** Invokes the ValidateAsync method */ @@ -3667,7 +3691,9 @@ class TestResourceContextImpl implements TestResourceContext { * Thenable wrapper for TestResourceContext that enables fluent chaining. */ class TestResourceContextPromiseImpl implements TestResourceContextPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestResourceContext) => TResult1 | PromiseLike) | null, @@ -3683,7 +3709,7 @@ class TestResourceContextPromiseImpl implements TestResourceContextPromise { /** Invokes the SetValueAsync method */ setValueAsync(value: string): TestResourceContextPromise { - return new TestResourceContextPromiseImpl(this._promise.then(obj => obj.setValueAsync(value))); + return new TestResourceContextPromiseImpl(this._promise.then(obj => obj.setValueAsync(value)), this._client); } /** Invokes the ValidateAsync method */ @@ -3701,7 +3727,7 @@ export interface UpdateCommandStateContext { toJSON(): MarshalledHandle; serviceProvider: { get: () => Promise; - set: (value: ServiceProvider) => Promise; + set: (value: ServiceProvider | PromiseLike) => Promise; }; } @@ -3727,10 +3753,10 @@ class UpdateCommandStateContextImpl implements UpdateCommandStateContext { ); return new ServiceProviderImpl(handle, this._client); }, - set: async (value: ServiceProvider): Promise => { + set: async (value: ServiceProvider | PromiseLike): Promise => { await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/UpdateCommandStateContext.setServiceProvider', - { context: this._handle, value } + { context: this._handle, value: value_resolved } ); } }; @@ -3822,7 +3848,9 @@ class ConfigurationImpl implements Configuration { * Thenable wrapper for Configuration that enables fluent chaining. */ class ConfigurationPromiseImpl implements ConfigurationPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: Configuration) => TResult1 | PromiseLike) | null, @@ -3882,7 +3910,7 @@ export interface DistributedApplicationBuilder { build(): DistributedApplicationPromise; addConnectionStringExpression(name: string, connectionStringExpression: ReferenceExpression): ConnectionStringResourcePromise; addConnectionStringBuilder(name: string, connectionStringBuilder: (obj: ReferenceExpressionBuilder) => Promise): ConnectionStringResourcePromise; - addContainerRegistry(name: string, endpoint: ParameterResource, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; + addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise; addContainer(name: string, image: string): ContainerResourcePromise; addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise; @@ -3890,7 +3918,7 @@ export interface DistributedApplicationBuilder { addExecutable(name: string, command: string, workingDirectory: string, args: string[]): ExecutableResourcePromise; addExternalService(name: string, url: string): ExternalServiceResourcePromise; addExternalServiceUri(name: string, uri: string): ExternalServiceResourcePromise; - addExternalServiceParameter(name: string, urlParameter: ParameterResource): ExternalServiceResourcePromise; + addExternalServiceParameter(name: string, urlParameter: ParameterResource | PromiseLike): ExternalServiceResourcePromise; addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise; addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise; addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise; @@ -3910,7 +3938,7 @@ export interface DistributedApplicationBuilderPromise extends PromiseLike Promise): ConnectionStringResourcePromise; - addContainerRegistry(name: string, endpoint: ParameterResource, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; + addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise; addContainer(name: string, image: string): ContainerResourcePromise; addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise; @@ -3918,7 +3946,7 @@ export interface DistributedApplicationBuilderPromise extends PromiseLike): ExternalServiceResourcePromise; addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise; addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise; addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise; @@ -4013,13 +4041,14 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } build(): DistributedApplicationPromise { - return new DistributedApplicationPromiseImpl(this._buildInternal()); + return new DistributedApplicationPromiseImpl(this._buildInternal(), this._client); } /** Adds a connection string with a reference expression */ /** @internal */ async _addConnectionStringExpressionInternal(name: string, connectionStringExpression: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, connectionStringExpression }; + const connectionStringExpression_resolved = isPromiseLike(connectionStringExpression) ? await connectionStringExpression : connectionStringExpression; + const rpcArgs: Record = { builder: this._handle, name, connectionStringExpression: connectionStringExpression_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/addConnectionStringExpression', rpcArgs @@ -4028,7 +4057,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addConnectionStringExpression(name: string, connectionStringExpression: ReferenceExpression): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._addConnectionStringExpressionInternal(name, connectionStringExpression)); + return new ConnectionStringResourcePromiseImpl(this._addConnectionStringExpressionInternal(name, connectionStringExpression), this._client); } /** Adds a connection string with a builder callback */ @@ -4048,14 +4077,16 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addConnectionStringBuilder(name: string, connectionStringBuilder: (obj: ReferenceExpressionBuilder) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._addConnectionStringBuilderInternal(name, connectionStringBuilder)); + return new ConnectionStringResourcePromiseImpl(this._addConnectionStringBuilderInternal(name, connectionStringBuilder), this._client); } /** Adds a container registry resource */ /** @internal */ - async _addContainerRegistryInternal(name: string, endpoint: ParameterResource, repository?: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpoint }; - if (repository !== undefined) rpcArgs.repository = repository; + async _addContainerRegistryInternal(name: string, endpoint: ParameterResource | PromiseLike, repository?: ParameterResource | PromiseLike): Promise { + const endpoint_resolved = isPromiseLike(endpoint) ? await endpoint : endpoint; + const repository_resolved = isPromiseLike(repository) ? await repository : repository; + const rpcArgs: Record = { builder: this._handle, name, endpoint: endpoint_resolved }; + if (repository !== undefined) rpcArgs.repository = repository_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/addContainerRegistry', rpcArgs @@ -4063,9 +4094,9 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder return new ContainerRegistryResourceImpl(result, this._client); } - addContainerRegistry(name: string, endpoint: ParameterResource, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { + addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { const repository = options?.repository; - return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryInternal(name, endpoint, repository)); + return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryInternal(name, endpoint, repository), this._client); } /** Adds a container registry with string endpoint */ @@ -4082,7 +4113,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise { const repository = options?.repository; - return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryFromStringInternal(name, endpoint, repository)); + return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryFromStringInternal(name, endpoint, repository), this._client); } /** Adds a container resource */ @@ -4097,7 +4128,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addContainer(name: string, image: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._addContainerInternal(name, image)); + return new ContainerResourcePromiseImpl(this._addContainerInternal(name, image), this._client); } /** Adds a container resource built from a Dockerfile */ @@ -4116,7 +4147,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise { const dockerfilePath = options?.dockerfilePath; const stage = options?.stage; - return new ContainerResourcePromiseImpl(this._addDockerfileInternal(name, contextPath, dockerfilePath, stage)); + return new ContainerResourcePromiseImpl(this._addDockerfileInternal(name, contextPath, dockerfilePath, stage), this._client); } /** Adds a .NET tool resource */ @@ -4131,7 +4162,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addDotnetTool(name: string, packageId: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._addDotnetToolInternal(name, packageId)); + return new DotnetToolResourcePromiseImpl(this._addDotnetToolInternal(name, packageId), this._client); } /** Adds an executable resource */ @@ -4146,7 +4177,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addExecutable(name: string, command: string, workingDirectory: string, args: string[]): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._addExecutableInternal(name, command, workingDirectory, args)); + return new ExecutableResourcePromiseImpl(this._addExecutableInternal(name, command, workingDirectory, args), this._client); } /** Adds an external service resource */ @@ -4161,7 +4192,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addExternalService(name: string, url: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._addExternalServiceInternal(name, url)); + return new ExternalServiceResourcePromiseImpl(this._addExternalServiceInternal(name, url), this._client); } /** Adds an external service with a URI */ @@ -4176,13 +4207,14 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addExternalServiceUri(name: string, uri: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._addExternalServiceUriInternal(name, uri)); + return new ExternalServiceResourcePromiseImpl(this._addExternalServiceUriInternal(name, uri), this._client); } /** Adds an external service with a parameter URL */ /** @internal */ - async _addExternalServiceParameterInternal(name: string, urlParameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, urlParameter }; + async _addExternalServiceParameterInternal(name: string, urlParameter: ParameterResource | PromiseLike): Promise { + const urlParameter_resolved = isPromiseLike(urlParameter) ? await urlParameter : urlParameter; + const rpcArgs: Record = { builder: this._handle, name, urlParameter: urlParameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/addExternalServiceParameter', rpcArgs @@ -4190,8 +4222,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder return new ExternalServiceResourceImpl(result, this._client); } - addExternalServiceParameter(name: string, urlParameter: ParameterResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._addExternalServiceParameterInternal(name, urlParameter)); + addExternalServiceParameter(name: string, urlParameter: ParameterResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._addExternalServiceParameterInternal(name, urlParameter), this._client); } /** Adds a parameter resource */ @@ -4208,7 +4240,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise { const secret = options?.secret; - return new ParameterResourcePromiseImpl(this._addParameterInternal(name, secret)); + return new ParameterResourcePromiseImpl(this._addParameterInternal(name, secret), this._client); } /** Adds a parameter with a default value */ @@ -4227,7 +4259,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise { const publishValueAsDefault = options?.publishValueAsDefault; const secret = options?.secret; - return new ParameterResourcePromiseImpl(this._addParameterWithValueInternal(name, value, publishValueAsDefault, secret)); + return new ParameterResourcePromiseImpl(this._addParameterWithValueInternal(name, value, publishValueAsDefault, secret), this._client); } /** Adds a parameter sourced from configuration */ @@ -4244,7 +4276,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise { const secret = options?.secret; - return new ParameterResourcePromiseImpl(this._addParameterFromConfigurationInternal(name, configurationKey, secret)); + return new ParameterResourcePromiseImpl(this._addParameterFromConfigurationInternal(name, configurationKey, secret), this._client); } /** Adds a connection string resource */ @@ -4261,7 +4293,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addConnectionString(name: string, options?: AddConnectionStringOptions): ResourceWithConnectionStringPromise { const environmentVariableName = options?.environmentVariableName; - return new ResourceWithConnectionStringPromiseImpl(this._addConnectionStringInternal(name, environmentVariableName)); + return new ResourceWithConnectionStringPromiseImpl(this._addConnectionStringInternal(name, environmentVariableName), this._client); } /** Adds a .NET project resource */ @@ -4276,7 +4308,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addProject(name: string, projectPath: string, launchProfileName: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._addProjectInternal(name, projectPath, launchProfileName)); + return new ProjectResourcePromiseImpl(this._addProjectInternal(name, projectPath, launchProfileName), this._client); } /** Adds a project resource with configuration options */ @@ -4296,7 +4328,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addProjectWithOptions(name: string, projectPath: string, configure: (obj: ProjectResourceOptions) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._addProjectWithOptionsInternal(name, projectPath, configure)); + return new ProjectResourcePromiseImpl(this._addProjectWithOptionsInternal(name, projectPath, configure), this._client); } /** Adds a C# application resource */ @@ -4311,7 +4343,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addCSharpApp(name: string, path: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._addCSharpAppInternal(name, path)); + return new ProjectResourcePromiseImpl(this._addCSharpAppInternal(name, path), this._client); } /** Adds a C# application resource with configuration options */ @@ -4331,7 +4363,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addCSharpAppWithOptions(name: string, path: string, configure: (obj: ProjectResourceOptions) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._addCSharpAppWithOptionsInternal(name, path, configure)); + return new CSharpAppResourcePromiseImpl(this._addCSharpAppWithOptionsInternal(name, path, configure), this._client); } /** Gets the application configuration */ @@ -4346,7 +4378,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } getConfiguration(): ConfigurationPromise { - return new ConfigurationPromiseImpl(this._getConfigurationInternal()); + return new ConfigurationPromiseImpl(this._getConfigurationInternal(), this._client); } /** Subscribes to the BeforeStart event */ @@ -4391,7 +4423,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { const port = options?.port; - return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port)); + return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port), this._client); } /** Adds a test vault resource */ @@ -4406,7 +4438,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addTestVault(name: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._addTestVaultInternal(name)); + return new TestVaultResourcePromiseImpl(this._addTestVaultInternal(name), this._client); } } @@ -4415,7 +4447,9 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder * Thenable wrapper for DistributedApplicationBuilder that enables fluent chaining. */ class DistributedApplicationBuilderPromiseImpl implements DistributedApplicationBuilderPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: DistributedApplicationBuilder) => TResult1 | PromiseLike) | null, @@ -4426,107 +4460,107 @@ class DistributedApplicationBuilderPromiseImpl implements DistributedApplication /** Builds the distributed application */ build(): DistributedApplicationPromise { - return new DistributedApplicationPromiseImpl(this._promise.then(obj => obj.build())); + return new DistributedApplicationPromiseImpl(this._promise.then(obj => obj.build()), this._client); } /** Adds a connection string with a reference expression */ addConnectionStringExpression(name: string, connectionStringExpression: ReferenceExpression): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.addConnectionStringExpression(name, connectionStringExpression))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.addConnectionStringExpression(name, connectionStringExpression)), this._client); } /** Adds a connection string with a builder callback */ addConnectionStringBuilder(name: string, connectionStringBuilder: (obj: ReferenceExpressionBuilder) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.addConnectionStringBuilder(name, connectionStringBuilder))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.addConnectionStringBuilder(name, connectionStringBuilder)), this._client); } /** Adds a container registry resource */ - addContainerRegistry(name: string, endpoint: ParameterResource, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.addContainerRegistry(name, endpoint, options))); + addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.addContainerRegistry(name, endpoint, options)), this._client); } /** Adds a container registry with string endpoint */ addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.addContainerRegistryFromString(name, endpoint, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.addContainerRegistryFromString(name, endpoint, options)), this._client); } /** Adds a container resource */ addContainer(name: string, image: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.addContainer(name, image))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.addContainer(name, image)), this._client); } /** Adds a container resource built from a Dockerfile */ addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.addDockerfile(name, contextPath, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.addDockerfile(name, contextPath, options)), this._client); } /** Adds a .NET tool resource */ addDotnetTool(name: string, packageId: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.addDotnetTool(name, packageId))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.addDotnetTool(name, packageId)), this._client); } /** Adds an executable resource */ addExecutable(name: string, command: string, workingDirectory: string, args: string[]): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.addExecutable(name, command, workingDirectory, args))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.addExecutable(name, command, workingDirectory, args)), this._client); } /** Adds an external service resource */ addExternalService(name: string, url: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.addExternalService(name, url))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.addExternalService(name, url)), this._client); } /** Adds an external service with a URI */ addExternalServiceUri(name: string, uri: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.addExternalServiceUri(name, uri))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.addExternalServiceUri(name, uri)), this._client); } /** Adds an external service with a parameter URL */ - addExternalServiceParameter(name: string, urlParameter: ParameterResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.addExternalServiceParameter(name, urlParameter))); + addExternalServiceParameter(name: string, urlParameter: ParameterResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.addExternalServiceParameter(name, urlParameter)), this._client); } /** Adds a parameter resource */ addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.addParameter(name, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.addParameter(name, options)), this._client); } /** Adds a parameter with a default value */ addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.addParameterWithValue(name, value, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.addParameterWithValue(name, value, options)), this._client); } /** Adds a parameter sourced from configuration */ addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.addParameterFromConfiguration(name, configurationKey, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.addParameterFromConfiguration(name, configurationKey, options)), this._client); } /** Adds a connection string resource */ addConnectionString(name: string, options?: AddConnectionStringOptions): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.addConnectionString(name, options))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.addConnectionString(name, options)), this._client); } /** Adds a .NET project resource */ addProject(name: string, projectPath: string, launchProfileName: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.addProject(name, projectPath, launchProfileName))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.addProject(name, projectPath, launchProfileName)), this._client); } /** Adds a project resource with configuration options */ addProjectWithOptions(name: string, projectPath: string, configure: (obj: ProjectResourceOptions) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.addProjectWithOptions(name, projectPath, configure))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.addProjectWithOptions(name, projectPath, configure)), this._client); } /** Adds a C# application resource */ addCSharpApp(name: string, path: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.addCSharpApp(name, path))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.addCSharpApp(name, path)), this._client); } /** Adds a C# application resource with configuration options */ addCSharpAppWithOptions(name: string, path: string, configure: (obj: ProjectResourceOptions) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.addCSharpAppWithOptions(name, path, configure))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.addCSharpAppWithOptions(name, path, configure)), this._client); } /** Gets the application configuration */ getConfiguration(): ConfigurationPromise { - return new ConfigurationPromiseImpl(this._promise.then(obj => obj.getConfiguration())); + return new ConfigurationPromiseImpl(this._promise.then(obj => obj.getConfiguration()), this._client); } /** Subscribes to the BeforeStart event */ @@ -4541,12 +4575,12 @@ class DistributedApplicationBuilderPromiseImpl implements DistributedApplication /** Adds a test Redis resource */ addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.addTestRedis(name, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.addTestRedis(name, options)), this._client); } /** Adds a test vault resource */ addTestVault(name: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.addTestVault(name))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.addTestVault(name)), this._client); } } @@ -4580,7 +4614,8 @@ class DistributedApplicationEventingImpl implements DistributedApplicationEventi /** Invokes the Unsubscribe method */ /** @internal */ async _unsubscribeInternal(subscription: DistributedApplicationEventSubscriptionHandle): Promise { - const rpcArgs: Record = { context: this._handle, subscription }; + const subscription_resolved = isPromiseLike(subscription) ? await subscription : subscription; + const rpcArgs: Record = { context: this._handle, subscription: subscription_resolved }; await this._client.invokeCapability( 'Aspire.Hosting.Eventing/IDistributedApplicationEventing.unsubscribe', rpcArgs @@ -4589,7 +4624,7 @@ class DistributedApplicationEventingImpl implements DistributedApplicationEventi } unsubscribe(subscription: DistributedApplicationEventSubscriptionHandle): DistributedApplicationEventingPromise { - return new DistributedApplicationEventingPromiseImpl(this._unsubscribeInternal(subscription)); + return new DistributedApplicationEventingPromiseImpl(this._unsubscribeInternal(subscription), this._client); } } @@ -4598,7 +4633,9 @@ class DistributedApplicationEventingImpl implements DistributedApplicationEventi * Thenable wrapper for DistributedApplicationEventing that enables fluent chaining. */ class DistributedApplicationEventingPromiseImpl implements DistributedApplicationEventingPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: DistributedApplicationEventing) => TResult1 | PromiseLike) | null, @@ -4609,7 +4646,7 @@ class DistributedApplicationEventingPromiseImpl implements DistributedApplicatio /** Invokes the Unsubscribe method */ unsubscribe(subscription: DistributedApplicationEventSubscriptionHandle): DistributedApplicationEventingPromise { - return new DistributedApplicationEventingPromiseImpl(this._promise.then(obj => obj.unsubscribe(subscription))); + return new DistributedApplicationEventingPromiseImpl(this._promise.then(obj => obj.unsubscribe(subscription)), this._client); } } @@ -4688,7 +4725,9 @@ class HostEnvironmentImpl implements HostEnvironment { * Thenable wrapper for HostEnvironment that enables fluent chaining. */ class HostEnvironmentPromiseImpl implements HostEnvironmentPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: HostEnvironment) => TResult1 | PromiseLike) | null, @@ -4765,7 +4804,7 @@ class LoggerImpl implements Logger { } logInformation(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._logInformationInternal(message)); + return new LoggerPromiseImpl(this._logInformationInternal(message), this._client); } /** Logs a warning message */ @@ -4780,7 +4819,7 @@ class LoggerImpl implements Logger { } logWarning(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._logWarningInternal(message)); + return new LoggerPromiseImpl(this._logWarningInternal(message), this._client); } /** Logs an error message */ @@ -4795,7 +4834,7 @@ class LoggerImpl implements Logger { } logError(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._logErrorInternal(message)); + return new LoggerPromiseImpl(this._logErrorInternal(message), this._client); } /** Logs a debug message */ @@ -4810,7 +4849,7 @@ class LoggerImpl implements Logger { } logDebug(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._logDebugInternal(message)); + return new LoggerPromiseImpl(this._logDebugInternal(message), this._client); } /** Logs a message with specified level */ @@ -4825,7 +4864,7 @@ class LoggerImpl implements Logger { } log(level: string, message: string): LoggerPromise { - return new LoggerPromiseImpl(this._logInternal(level, message)); + return new LoggerPromiseImpl(this._logInternal(level, message), this._client); } } @@ -4834,7 +4873,9 @@ class LoggerImpl implements Logger { * Thenable wrapper for Logger that enables fluent chaining. */ class LoggerPromiseImpl implements LoggerPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: Logger) => TResult1 | PromiseLike) | null, @@ -4845,27 +4886,27 @@ class LoggerPromiseImpl implements LoggerPromise { /** Logs an information message */ logInformation(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._promise.then(obj => obj.logInformation(message))); + return new LoggerPromiseImpl(this._promise.then(obj => obj.logInformation(message)), this._client); } /** Logs a warning message */ logWarning(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._promise.then(obj => obj.logWarning(message))); + return new LoggerPromiseImpl(this._promise.then(obj => obj.logWarning(message)), this._client); } /** Logs an error message */ logError(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._promise.then(obj => obj.logError(message))); + return new LoggerPromiseImpl(this._promise.then(obj => obj.logError(message)), this._client); } /** Logs a debug message */ logDebug(message: string): LoggerPromise { - return new LoggerPromiseImpl(this._promise.then(obj => obj.logDebug(message))); + return new LoggerPromiseImpl(this._promise.then(obj => obj.logDebug(message)), this._client); } /** Logs a message with specified level */ log(level: string, message: string): LoggerPromise { - return new LoggerPromiseImpl(this._promise.then(obj => obj.log(level, message))); + return new LoggerPromiseImpl(this._promise.then(obj => obj.log(level, message)), this._client); } } @@ -4908,7 +4949,7 @@ class LoggerFactoryImpl implements LoggerFactory { } createLogger(categoryName: string): LoggerPromise { - return new LoggerPromiseImpl(this._createLoggerInternal(categoryName)); + return new LoggerPromiseImpl(this._createLoggerInternal(categoryName), this._client); } } @@ -4917,7 +4958,9 @@ class LoggerFactoryImpl implements LoggerFactory { * Thenable wrapper for LoggerFactory that enables fluent chaining. */ class LoggerFactoryPromiseImpl implements LoggerFactoryPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: LoggerFactory) => TResult1 | PromiseLike) | null, @@ -4928,7 +4971,7 @@ class LoggerFactoryPromiseImpl implements LoggerFactoryPromise { /** Creates a logger for a category */ createLogger(categoryName: string): LoggerPromise { - return new LoggerPromiseImpl(this._promise.then(obj => obj.createLogger(categoryName))); + return new LoggerPromiseImpl(this._promise.then(obj => obj.createLogger(categoryName)), this._client); } } @@ -4983,7 +5026,7 @@ class ReportingStepImpl implements ReportingStep { createTask(statusText: string, options?: CreateTaskOptions): ReportingTaskPromise { const cancellationToken = options?.cancellationToken; - return new ReportingTaskPromiseImpl(this._createTaskInternal(statusText, cancellationToken)); + return new ReportingTaskPromiseImpl(this._createTaskInternal(statusText, cancellationToken), this._client); } /** Creates a reporting task with Markdown-formatted status text */ @@ -5000,7 +5043,7 @@ class ReportingStepImpl implements ReportingStep { createMarkdownTask(markdownString: string, options?: CreateMarkdownTaskOptions): ReportingTaskPromise { const cancellationToken = options?.cancellationToken; - return new ReportingTaskPromiseImpl(this._createMarkdownTaskInternal(markdownString, cancellationToken)); + return new ReportingTaskPromiseImpl(this._createMarkdownTaskInternal(markdownString, cancellationToken), this._client); } /** Logs a plain-text message for the reporting step */ @@ -5015,7 +5058,7 @@ class ReportingStepImpl implements ReportingStep { } logStep(level: string, message: string): ReportingStepPromise { - return new ReportingStepPromiseImpl(this._logStepInternal(level, message)); + return new ReportingStepPromiseImpl(this._logStepInternal(level, message), this._client); } /** Logs a Markdown-formatted message for the reporting step */ @@ -5030,7 +5073,7 @@ class ReportingStepImpl implements ReportingStep { } logStepMarkdown(level: string, markdownString: string): ReportingStepPromise { - return new ReportingStepPromiseImpl(this._logStepMarkdownInternal(level, markdownString)); + return new ReportingStepPromiseImpl(this._logStepMarkdownInternal(level, markdownString), this._client); } /** Completes the reporting step with plain-text completion text */ @@ -5049,7 +5092,7 @@ class ReportingStepImpl implements ReportingStep { completeStep(completionText: string, options?: CompleteStepOptions): ReportingStepPromise { const completionState = options?.completionState; const cancellationToken = options?.cancellationToken; - return new ReportingStepPromiseImpl(this._completeStepInternal(completionText, completionState, cancellationToken)); + return new ReportingStepPromiseImpl(this._completeStepInternal(completionText, completionState, cancellationToken), this._client); } /** Completes the reporting step with Markdown-formatted completion text */ @@ -5068,7 +5111,7 @@ class ReportingStepImpl implements ReportingStep { completeStepMarkdown(markdownString: string, options?: CompleteStepMarkdownOptions): ReportingStepPromise { const completionState = options?.completionState; const cancellationToken = options?.cancellationToken; - return new ReportingStepPromiseImpl(this._completeStepMarkdownInternal(markdownString, completionState, cancellationToken)); + return new ReportingStepPromiseImpl(this._completeStepMarkdownInternal(markdownString, completionState, cancellationToken), this._client); } } @@ -5077,7 +5120,9 @@ class ReportingStepImpl implements ReportingStep { * Thenable wrapper for ReportingStep that enables fluent chaining. */ class ReportingStepPromiseImpl implements ReportingStepPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ReportingStep) => TResult1 | PromiseLike) | null, @@ -5088,32 +5133,32 @@ class ReportingStepPromiseImpl implements ReportingStepPromise { /** Creates a reporting task with plain-text status text */ createTask(statusText: string, options?: CreateTaskOptions): ReportingTaskPromise { - return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.createTask(statusText, options))); + return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.createTask(statusText, options)), this._client); } /** Creates a reporting task with Markdown-formatted status text */ createMarkdownTask(markdownString: string, options?: CreateMarkdownTaskOptions): ReportingTaskPromise { - return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.createMarkdownTask(markdownString, options))); + return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.createMarkdownTask(markdownString, options)), this._client); } /** Logs a plain-text message for the reporting step */ logStep(level: string, message: string): ReportingStepPromise { - return new ReportingStepPromiseImpl(this._promise.then(obj => obj.logStep(level, message))); + return new ReportingStepPromiseImpl(this._promise.then(obj => obj.logStep(level, message)), this._client); } /** Logs a Markdown-formatted message for the reporting step */ logStepMarkdown(level: string, markdownString: string): ReportingStepPromise { - return new ReportingStepPromiseImpl(this._promise.then(obj => obj.logStepMarkdown(level, markdownString))); + return new ReportingStepPromiseImpl(this._promise.then(obj => obj.logStepMarkdown(level, markdownString)), this._client); } /** Completes the reporting step with plain-text completion text */ completeStep(completionText: string, options?: CompleteStepOptions): ReportingStepPromise { - return new ReportingStepPromiseImpl(this._promise.then(obj => obj.completeStep(completionText, options))); + return new ReportingStepPromiseImpl(this._promise.then(obj => obj.completeStep(completionText, options)), this._client); } /** Completes the reporting step with Markdown-formatted completion text */ completeStepMarkdown(markdownString: string, options?: CompleteStepMarkdownOptions): ReportingStepPromise { - return new ReportingStepPromiseImpl(this._promise.then(obj => obj.completeStepMarkdown(markdownString, options))); + return new ReportingStepPromiseImpl(this._promise.then(obj => obj.completeStepMarkdown(markdownString, options)), this._client); } } @@ -5164,7 +5209,7 @@ class ReportingTaskImpl implements ReportingTask { updateTask(statusText: string, options?: UpdateTaskOptions): ReportingTaskPromise { const cancellationToken = options?.cancellationToken; - return new ReportingTaskPromiseImpl(this._updateTaskInternal(statusText, cancellationToken)); + return new ReportingTaskPromiseImpl(this._updateTaskInternal(statusText, cancellationToken), this._client); } /** Updates the reporting task with Markdown-formatted status text */ @@ -5181,7 +5226,7 @@ class ReportingTaskImpl implements ReportingTask { updateTaskMarkdown(markdownString: string, options?: UpdateTaskMarkdownOptions): ReportingTaskPromise { const cancellationToken = options?.cancellationToken; - return new ReportingTaskPromiseImpl(this._updateTaskMarkdownInternal(markdownString, cancellationToken)); + return new ReportingTaskPromiseImpl(this._updateTaskMarkdownInternal(markdownString, cancellationToken), this._client); } /** Completes the reporting task with plain-text completion text */ @@ -5202,7 +5247,7 @@ class ReportingTaskImpl implements ReportingTask { const completionMessage = options?.completionMessage; const completionState = options?.completionState; const cancellationToken = options?.cancellationToken; - return new ReportingTaskPromiseImpl(this._completeTaskInternal(completionMessage, completionState, cancellationToken)); + return new ReportingTaskPromiseImpl(this._completeTaskInternal(completionMessage, completionState, cancellationToken), this._client); } /** Completes the reporting task with Markdown-formatted completion text */ @@ -5221,7 +5266,7 @@ class ReportingTaskImpl implements ReportingTask { completeTaskMarkdown(markdownString: string, options?: CompleteTaskMarkdownOptions): ReportingTaskPromise { const completionState = options?.completionState; const cancellationToken = options?.cancellationToken; - return new ReportingTaskPromiseImpl(this._completeTaskMarkdownInternal(markdownString, completionState, cancellationToken)); + return new ReportingTaskPromiseImpl(this._completeTaskMarkdownInternal(markdownString, completionState, cancellationToken), this._client); } } @@ -5230,7 +5275,9 @@ class ReportingTaskImpl implements ReportingTask { * Thenable wrapper for ReportingTask that enables fluent chaining. */ class ReportingTaskPromiseImpl implements ReportingTaskPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ReportingTask) => TResult1 | PromiseLike) | null, @@ -5241,22 +5288,22 @@ class ReportingTaskPromiseImpl implements ReportingTaskPromise { /** Updates the reporting task with plain-text status text */ updateTask(statusText: string, options?: UpdateTaskOptions): ReportingTaskPromise { - return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.updateTask(statusText, options))); + return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.updateTask(statusText, options)), this._client); } /** Updates the reporting task with Markdown-formatted status text */ updateTaskMarkdown(markdownString: string, options?: UpdateTaskMarkdownOptions): ReportingTaskPromise { - return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.updateTaskMarkdown(markdownString, options))); + return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.updateTaskMarkdown(markdownString, options)), this._client); } /** Completes the reporting task with plain-text completion text */ completeTask(options?: CompleteTaskOptions): ReportingTaskPromise { - return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.completeTask(options))); + return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.completeTask(options)), this._client); } /** Completes the reporting task with Markdown-formatted completion text */ completeTaskMarkdown(markdownString: string, options?: CompleteTaskMarkdownOptions): ReportingTaskPromise { - return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.completeTaskMarkdown(markdownString, options))); + return new ReportingTaskPromiseImpl(this._promise.then(obj => obj.completeTaskMarkdown(markdownString, options)), this._client); } } @@ -5309,7 +5356,7 @@ class ServiceProviderImpl implements ServiceProvider { } getEventing(): DistributedApplicationEventingPromise { - return new DistributedApplicationEventingPromiseImpl(this._getEventingInternal()); + return new DistributedApplicationEventingPromiseImpl(this._getEventingInternal(), this._client); } /** Gets the logger factory from the service provider */ @@ -5324,7 +5371,7 @@ class ServiceProviderImpl implements ServiceProvider { } getLoggerFactory(): LoggerFactoryPromise { - return new LoggerFactoryPromiseImpl(this._getLoggerFactoryInternal()); + return new LoggerFactoryPromiseImpl(this._getLoggerFactoryInternal(), this._client); } /** Gets the resource logger service from the service provider */ @@ -5339,7 +5386,7 @@ class ServiceProviderImpl implements ServiceProvider { } getResourceLoggerService(): ResourceLoggerServicePromise { - return new ResourceLoggerServicePromiseImpl(this._getResourceLoggerServiceInternal()); + return new ResourceLoggerServicePromiseImpl(this._getResourceLoggerServiceInternal(), this._client); } /** Gets the distributed application model from the service provider */ @@ -5354,7 +5401,7 @@ class ServiceProviderImpl implements ServiceProvider { } getDistributedApplicationModel(): DistributedApplicationModelPromise { - return new DistributedApplicationModelPromiseImpl(this._getDistributedApplicationModelInternal()); + return new DistributedApplicationModelPromiseImpl(this._getDistributedApplicationModelInternal(), this._client); } /** Gets the resource notification service from the service provider */ @@ -5369,7 +5416,7 @@ class ServiceProviderImpl implements ServiceProvider { } getResourceNotificationService(): ResourceNotificationServicePromise { - return new ResourceNotificationServicePromiseImpl(this._getResourceNotificationServiceInternal()); + return new ResourceNotificationServicePromiseImpl(this._getResourceNotificationServiceInternal(), this._client); } /** Gets the user secrets manager from the service provider */ @@ -5384,7 +5431,7 @@ class ServiceProviderImpl implements ServiceProvider { } getUserSecretsManager(): UserSecretsManagerPromise { - return new UserSecretsManagerPromiseImpl(this._getUserSecretsManagerInternal()); + return new UserSecretsManagerPromiseImpl(this._getUserSecretsManagerInternal(), this._client); } } @@ -5393,7 +5440,9 @@ class ServiceProviderImpl implements ServiceProvider { * Thenable wrapper for ServiceProvider that enables fluent chaining. */ class ServiceProviderPromiseImpl implements ServiceProviderPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ServiceProvider) => TResult1 | PromiseLike) | null, @@ -5404,32 +5453,32 @@ class ServiceProviderPromiseImpl implements ServiceProviderPromise { /** Gets the distributed application eventing service from the service provider */ getEventing(): DistributedApplicationEventingPromise { - return new DistributedApplicationEventingPromiseImpl(this._promise.then(obj => obj.getEventing())); + return new DistributedApplicationEventingPromiseImpl(this._promise.then(obj => obj.getEventing()), this._client); } /** Gets the logger factory from the service provider */ getLoggerFactory(): LoggerFactoryPromise { - return new LoggerFactoryPromiseImpl(this._promise.then(obj => obj.getLoggerFactory())); + return new LoggerFactoryPromiseImpl(this._promise.then(obj => obj.getLoggerFactory()), this._client); } /** Gets the resource logger service from the service provider */ getResourceLoggerService(): ResourceLoggerServicePromise { - return new ResourceLoggerServicePromiseImpl(this._promise.then(obj => obj.getResourceLoggerService())); + return new ResourceLoggerServicePromiseImpl(this._promise.then(obj => obj.getResourceLoggerService()), this._client); } /** Gets the distributed application model from the service provider */ getDistributedApplicationModel(): DistributedApplicationModelPromise { - return new DistributedApplicationModelPromiseImpl(this._promise.then(obj => obj.getDistributedApplicationModel())); + return new DistributedApplicationModelPromiseImpl(this._promise.then(obj => obj.getDistributedApplicationModel()), this._client); } /** Gets the resource notification service from the service provider */ getResourceNotificationService(): ResourceNotificationServicePromise { - return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.getResourceNotificationService())); + return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.getResourceNotificationService()), this._client); } /** Gets the user secrets manager from the service provider */ getUserSecretsManager(): UserSecretsManagerPromise { - return new UserSecretsManagerPromiseImpl(this._promise.then(obj => obj.getUserSecretsManager())); + return new UserSecretsManagerPromiseImpl(this._promise.then(obj => obj.getUserSecretsManager()), this._client); } } @@ -5448,13 +5497,13 @@ export interface UserSecretsManager { }; trySetSecret(name: string, value: string): Promise; saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise; - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, name: string, value: string): UserSecretsManagerPromise; + getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise; } export interface UserSecretsManagerPromise extends PromiseLike { trySetSecret(name: string, value: string): Promise; saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise; - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, name: string, value: string): UserSecretsManagerPromise; + getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise; } // ============================================================================ @@ -5513,13 +5562,14 @@ class UserSecretsManagerImpl implements UserSecretsManager { saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise { const cancellationToken = options?.cancellationToken; - return new UserSecretsManagerPromiseImpl(this._saveStateJsonInternal(json, cancellationToken)); + return new UserSecretsManagerPromiseImpl(this._saveStateJsonInternal(json, cancellationToken), this._client); } /** Gets a secret value if it exists, or sets it to the provided value if it does not */ /** @internal */ - async _getOrSetSecretInternal(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, name: string, value: string): Promise { - const rpcArgs: Record = { userSecretsManager: this._handle, resourceBuilder, name, value }; + async _getOrSetSecretInternal(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): Promise { + const resourceBuilder_resolved = isPromiseLike(resourceBuilder) ? await resourceBuilder : resourceBuilder; + const rpcArgs: Record = { userSecretsManager: this._handle, resourceBuilder: resourceBuilder_resolved, name, value }; await this._client.invokeCapability( 'Aspire.Hosting/getOrSetSecret', rpcArgs @@ -5527,8 +5577,8 @@ class UserSecretsManagerImpl implements UserSecretsManager { return this; } - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, name: string, value: string): UserSecretsManagerPromise { - return new UserSecretsManagerPromiseImpl(this._getOrSetSecretInternal(resourceBuilder, name, value)); + getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise { + return new UserSecretsManagerPromiseImpl(this._getOrSetSecretInternal(resourceBuilder, name, value), this._client); } } @@ -5537,7 +5587,9 @@ class UserSecretsManagerImpl implements UserSecretsManager { * Thenable wrapper for UserSecretsManager that enables fluent chaining. */ class UserSecretsManagerPromiseImpl implements UserSecretsManagerPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: UserSecretsManager) => TResult1 | PromiseLike) | null, @@ -5553,12 +5605,12 @@ class UserSecretsManagerPromiseImpl implements UserSecretsManagerPromise { /** Saves state to user secrets from a JSON string */ saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise { - return new UserSecretsManagerPromiseImpl(this._promise.then(obj => obj.saveStateJson(json, options))); + return new UserSecretsManagerPromiseImpl(this._promise.then(obj => obj.saveStateJson(json, options)), this._client); } /** Gets a secret value if it exists, or sets it to the provided value if it does not */ - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, name: string, value: string): UserSecretsManagerPromise { - return new UserSecretsManagerPromiseImpl(this._promise.then(obj => obj.getOrSetSecret(resourceBuilder, name, value))); + getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise { + return new UserSecretsManagerPromiseImpl(this._promise.then(obj => obj.getOrSetSecret(resourceBuilder, name, value)), this._client); } } @@ -5569,7 +5621,7 @@ class UserSecretsManagerPromiseImpl implements UserSecretsManagerPromise { export interface ConnectionStringResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ConnectionStringResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ConnectionStringResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): ConnectionStringResourcePromise; @@ -5580,16 +5632,16 @@ export interface ConnectionStringResource { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ConnectionStringResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ConnectionStringResourcePromise; excludeFromManifest(): ConnectionStringResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; withExplicitStart(): ConnectionStringResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; withHealthCheck(key: string): ConnectionStringResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ConnectionStringResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ConnectionStringResourcePromise; excludeFromMcp(): ConnectionStringResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ConnectionStringResourcePromise; @@ -5610,10 +5662,10 @@ export interface ConnectionStringResource { withStatus(status: TestResourceStatus): ConnectionStringResourcePromise; withNestedConfig(config: TestNestedDto): ConnectionStringResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ConnectionStringResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; withConnectionStringDirect(connectionString: string): ConnectionStringResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ConnectionStringResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ConnectionStringResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; withEndpoints(endpoints: string[]): ConnectionStringResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ConnectionStringResourcePromise; withMergeLabel(label: string): ConnectionStringResourcePromise; @@ -5627,7 +5679,7 @@ export interface ConnectionStringResource { } export interface ConnectionStringResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ConnectionStringResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ConnectionStringResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): ConnectionStringResourcePromise; @@ -5638,16 +5690,16 @@ export interface ConnectionStringResourcePromise extends PromiseLike Promise): ConnectionStringResourcePromise; excludeFromManifest(): ConnectionStringResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; withExplicitStart(): ConnectionStringResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; withHealthCheck(key: string): ConnectionStringResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ConnectionStringResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ConnectionStringResourcePromise; excludeFromMcp(): ConnectionStringResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ConnectionStringResourcePromise; @@ -5668,10 +5720,10 @@ export interface ConnectionStringResourcePromise extends PromiseLike Promise): ConnectionStringResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; withConnectionStringDirect(connectionString: string): ConnectionStringResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ConnectionStringResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ConnectionStringResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; withEndpoints(endpoints: string[]): ConnectionStringResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ConnectionStringResourcePromise; withMergeLabel(label: string): ConnectionStringResourcePromise; @@ -5694,8 +5746,9 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -5704,8 +5757,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -5724,7 +5777,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', rpcArgs @@ -5756,7 +5810,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ConnectionStringResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -5817,12 +5871,13 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -5834,7 +5889,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ConnectionStringResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -5868,12 +5923,13 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -5882,13 +5938,14 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -5897,13 +5954,14 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -5912,13 +5970,14 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -5927,8 +5986,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -5943,12 +6002,13 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -5958,9 +6018,9 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { const exitCode = options?.exitCode; - return new ConnectionStringResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new ConnectionStringResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -5975,7 +6035,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ConnectionStringResourcePromise { const commandOptions = options?.commandOptions; - return new ConnectionStringResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ConnectionStringResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -6011,13 +6072,14 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -6026,8 +6088,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -6044,7 +6106,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ConnectionStringResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -6136,7 +6198,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ConnectionStringResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -6156,7 +6218,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ConnectionStringResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -6176,7 +6238,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._onConnectionStringAvailableInternal(callback)); + return new ConnectionStringResourcePromiseImpl(this._onConnectionStringAvailableInternal(callback), this._client); } /** @internal */ @@ -6196,7 +6258,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ConnectionStringResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -6216,7 +6278,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ConnectionStringResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -6235,7 +6297,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, connectionString }; + const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -6265,7 +6328,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ConnectionStringResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -6396,8 +6460,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ @@ -6412,12 +6476,13 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -6426,13 +6491,14 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -6441,8 +6507,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -6457,7 +6523,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ConnectionStringResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -6491,7 +6557,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ConnectionStringResource) => TResult1 | PromiseLike) | null, @@ -6625,28 +6693,28 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Adds a connection property with a reference expression */ withConnectionProperty(name: string, value: ReferenceExpression): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionProperty(name, value))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionProperty(name, value)), this._client); } /** Adds a connection property with a string value */ withConnectionPropertyValue(name: string, value: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionPropertyValue(name, value))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionPropertyValue(name, value)), this._client); } /** Gets a connection property by key */ @@ -6656,97 +6724,97 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -6756,147 +6824,147 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the ConnectionStringAvailable event */ onConnectionStringAvailable(callback: (arg: ConnectionStringAvailableEvent) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onConnectionStringAvailable(callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onConnectionStringAvailable(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Sets the connection string using a reference expression */ withConnectionString(connectionString: ReferenceExpression): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Sets connection string using direct interface target */ withConnectionStringDirect(connectionString: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise { + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ConnectionStringResourcePromise { - return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -6907,7 +6975,7 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro export interface ContainerRegistryResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerRegistryResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerRegistryResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ContainerRegistryResourcePromise; @@ -6918,8 +6986,8 @@ export interface ContainerRegistryResource { withExplicitStart(): ContainerRegistryResourcePromise; withHealthCheck(key: string): ContainerRegistryResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerRegistryResourcePromise; excludeFromMcp(): ContainerRegistryResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerRegistryResourcePromise; @@ -6938,9 +7006,9 @@ export interface ContainerRegistryResource { withStatus(status: TestResourceStatus): ContainerRegistryResourcePromise; withNestedConfig(config: TestNestedDto): ContainerRegistryResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ContainerRegistryResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerRegistryResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerRegistryResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; withEndpoints(endpoints: string[]): ContainerRegistryResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerRegistryResourcePromise; withMergeLabel(label: string): ContainerRegistryResourcePromise; @@ -6954,7 +7022,7 @@ export interface ContainerRegistryResource { } export interface ContainerRegistryResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerRegistryResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerRegistryResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ContainerRegistryResourcePromise; @@ -6965,8 +7033,8 @@ export interface ContainerRegistryResourcePromise extends PromiseLike Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerRegistryResourcePromise; excludeFromMcp(): ContainerRegistryResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerRegistryResourcePromise; @@ -6985,9 +7053,9 @@ export interface ContainerRegistryResourcePromise extends PromiseLike Promise): ContainerRegistryResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerRegistryResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerRegistryResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; withEndpoints(endpoints: string[]): ContainerRegistryResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerRegistryResourcePromise; withMergeLabel(label: string): ContainerRegistryResourcePromise; @@ -7010,8 +7078,9 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -7020,8 +7089,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -7040,7 +7109,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ContainerRegistryResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -7094,12 +7163,13 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -7111,7 +7181,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ContainerRegistryResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -7145,7 +7215,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise { const commandOptions = options?.commandOptions; - return new ContainerRegistryResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ContainerRegistryResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -7211,13 +7282,14 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -7226,8 +7298,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -7244,7 +7316,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ContainerRegistryResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -7336,7 +7408,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ContainerRegistryResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -7356,7 +7428,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ContainerRegistryResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -7376,7 +7448,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ContainerRegistryResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -7396,7 +7468,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ContainerRegistryResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -7415,7 +7487,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ContainerRegistryResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -7561,13 +7634,14 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -7576,13 +7650,14 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -7591,8 +7666,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -7607,7 +7682,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ContainerRegistryResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -7641,7 +7716,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ContainerRegistryResource) => TResult1 | PromiseLike) | null, @@ -7775,88 +7852,88 @@ class ContainerRegistryResourcePromiseImpl implements ContainerRegistryResourceP } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -7866,132 +7943,132 @@ class ContainerRegistryResourcePromiseImpl implements ContainerRegistryResourceP /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise { + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ContainerRegistryResourcePromise { - return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -8002,7 +8079,7 @@ class ContainerRegistryResourcePromiseImpl implements ContainerRegistryResourceP export interface ContainerResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise; withEntrypoint(entrypoint: string): ContainerResourcePromise; withImageTag(tag: string): ContainerResourcePromise; @@ -8015,8 +8092,8 @@ export interface ContainerResource { publishAsContainer(): ContainerResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise; withContainerName(name: string): ContainerResourcePromise; - withBuildArg(name: string, value: ParameterResource): ContainerResourcePromise; - withBuildSecret(name: string, value: ParameterResource): ContainerResourcePromise; + withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): ContainerResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise; withContainerNetworkAlias(alias: string): ContainerResourcePromise; @@ -8025,18 +8102,18 @@ export interface ContainerResource { withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise; publishAsConnectionString(): ContainerResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ContainerResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ContainerResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ContainerResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; withArgs(args: string[]): ContainerResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ContainerResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ContainerResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise; withReferenceUri(name: string, uri: string): ContainerResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): ContainerResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): ContainerResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; withEndpoint(options?: WithEndpointOptions): ContainerResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ContainerResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ContainerResourcePromise; @@ -8049,12 +8126,12 @@ export interface ContainerResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ContainerResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ContainerResourcePromise; excludeFromManifest(): ContainerResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; withExplicitStart(): ContainerResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ContainerResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise; withHealthCheck(key: string): ContainerResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ContainerResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise; @@ -8062,8 +8139,8 @@ export interface ContainerResource { withCertificateTrustScope(scope: CertificateTrustScope): ContainerResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ContainerResourcePromise; withoutHttpsCertificate(): ContainerResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ContainerResourcePromise; excludeFromMcp(): ContainerResourcePromise; @@ -8088,9 +8165,9 @@ export interface ContainerResource { withStatus(status: TestResourceStatus): ContainerResourcePromise; withNestedConfig(config: TestNestedDto): ContainerResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ContainerResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; withEndpoints(endpoints: string[]): ContainerResourcePromise; withEnvironmentVariables(variables: Record): ContainerResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerResourcePromise; @@ -8105,7 +8182,7 @@ export interface ContainerResource { } export interface ContainerResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise; withEntrypoint(entrypoint: string): ContainerResourcePromise; withImageTag(tag: string): ContainerResourcePromise; @@ -8118,8 +8195,8 @@ export interface ContainerResourcePromise extends PromiseLike publishAsContainer(): ContainerResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise; withContainerName(name: string): ContainerResourcePromise; - withBuildArg(name: string, value: ParameterResource): ContainerResourcePromise; - withBuildSecret(name: string, value: ParameterResource): ContainerResourcePromise; + withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): ContainerResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise; withContainerNetworkAlias(alias: string): ContainerResourcePromise; @@ -8128,18 +8205,18 @@ export interface ContainerResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise; publishAsConnectionString(): ContainerResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ContainerResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ContainerResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ContainerResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; withArgs(args: string[]): ContainerResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ContainerResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ContainerResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise; withReferenceUri(name: string, uri: string): ContainerResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): ContainerResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): ContainerResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; withEndpoint(options?: WithEndpointOptions): ContainerResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ContainerResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ContainerResourcePromise; @@ -8152,12 +8229,12 @@ export interface ContainerResourcePromise extends PromiseLike withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ContainerResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ContainerResourcePromise; excludeFromManifest(): ContainerResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; withExplicitStart(): ContainerResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ContainerResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise; withHealthCheck(key: string): ContainerResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ContainerResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise; @@ -8165,8 +8242,8 @@ export interface ContainerResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): ContainerResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ContainerResourcePromise; withoutHttpsCertificate(): ContainerResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ContainerResourcePromise; excludeFromMcp(): ContainerResourcePromise; @@ -8191,9 +8268,9 @@ export interface ContainerResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): ContainerResourcePromise; withNestedConfig(config: TestNestedDto): ContainerResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ContainerResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; withEndpoints(endpoints: string[]): ContainerResourcePromise; withEnvironmentVariables(variables: Record): ContainerResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerResourcePromise; @@ -8217,8 +8294,9 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -8227,8 +8305,8 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withContainerRegistryInternal(registry)); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -8245,7 +8323,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise { const isReadOnly = options?.isReadOnly; - return new ContainerResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly)); + return new ContainerResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } /** @internal */ @@ -8260,7 +8338,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container entrypoint */ withEntrypoint(entrypoint: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEntrypointInternal(entrypoint)); + return new ContainerResourcePromiseImpl(this._withEntrypointInternal(entrypoint), this._client); } /** @internal */ @@ -8275,7 +8353,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container image tag */ withImageTag(tag: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withImageTagInternal(tag)); + return new ContainerResourcePromiseImpl(this._withImageTagInternal(tag), this._client); } /** @internal */ @@ -8290,7 +8368,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container image registry */ withImageRegistry(registry: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withImageRegistryInternal(registry)); + return new ContainerResourcePromiseImpl(this._withImageRegistryInternal(registry), this._client); } /** @internal */ @@ -8307,7 +8385,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): ContainerResourcePromise { const tag = options?.tag; - return new ContainerResourcePromiseImpl(this._withImageInternal(image, tag)); + return new ContainerResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } /** @internal */ @@ -8322,7 +8400,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the image SHA256 digest */ withImageSHA256(sha256: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withImageSHA256Internal(sha256)); + return new ContainerResourcePromiseImpl(this._withImageSHA256Internal(sha256), this._client); } /** @internal */ @@ -8337,7 +8415,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds runtime arguments for the container */ withContainerRuntimeArgs(args: string[]): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withContainerRuntimeArgsInternal(args)); + return new ContainerResourcePromiseImpl(this._withContainerRuntimeArgsInternal(args), this._client); } /** @internal */ @@ -8352,7 +8430,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the lifetime behavior of the container resource */ withLifetime(lifetime: ContainerLifetime): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withLifetimeInternal(lifetime)); + return new ContainerResourcePromiseImpl(this._withLifetimeInternal(lifetime), this._client); } /** @internal */ @@ -8367,7 +8445,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container image pull policy */ withImagePullPolicy(pullPolicy: ImagePullPolicy): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withImagePullPolicyInternal(pullPolicy)); + return new ContainerResourcePromiseImpl(this._withImagePullPolicyInternal(pullPolicy), this._client); } /** @internal */ @@ -8382,7 +8460,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures the resource to be published as a container */ publishAsContainer(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._publishAsContainerInternal()); + return new ContainerResourcePromiseImpl(this._publishAsContainerInternal(), this._client); } /** @internal */ @@ -8401,7 +8479,7 @@ class ContainerResourceImpl extends ResourceBuilderBase withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise { const dockerfilePath = options?.dockerfilePath; const stage = options?.stage; - return new ContainerResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage)); + return new ContainerResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } /** @internal */ @@ -8416,12 +8494,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container name */ withContainerName(name: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withContainerNameInternal(name)); + return new ContainerResourcePromiseImpl(this._withContainerNameInternal(name), this._client); } /** @internal */ - private async _withBuildArgInternal(name: string, value: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -8430,13 +8509,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withBuildArgInternal(name, value)); + withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -8445,8 +8525,8 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withBuildSecretInternal(name, value)); + withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } /** @internal */ @@ -8461,7 +8541,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures endpoint proxy support */ withEndpointProxySupport(proxyEnabled: boolean): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEndpointProxySupportInternal(proxyEnabled)); + return new ContainerResourcePromiseImpl(this._withEndpointProxySupportInternal(proxyEnabled), this._client); } /** @internal */ @@ -8480,7 +8560,7 @@ class ContainerResourceImpl extends ResourceBuilderBase withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise { const buildImage = options?.buildImage; const runtimeImage = options?.runtimeImage; - return new ContainerResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage)); + return new ContainerResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } /** @internal */ @@ -8495,7 +8575,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a network alias for the container */ withContainerNetworkAlias(alias: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withContainerNetworkAliasInternal(alias)); + return new ContainerResourcePromiseImpl(this._withContainerNetworkAliasInternal(alias), this._client); } /** @internal */ @@ -8514,7 +8594,7 @@ class ContainerResourceImpl extends ResourceBuilderBase withMcpServer(options?: WithMcpServerOptions): ContainerResourcePromise { const path = options?.path; const endpointName = options?.endpointName; - return new ContainerResourcePromiseImpl(this._withMcpServerInternal(path, endpointName)); + return new ContainerResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } /** @internal */ @@ -8529,7 +8609,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export */ withOtlpExporter(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withOtlpExporterInternal()); + return new ContainerResourcePromiseImpl(this._withOtlpExporterInternal(), this._client); } /** @internal */ @@ -8544,7 +8624,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol)); + return new ContainerResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol), this._client); } /** @internal */ @@ -8559,7 +8639,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Publishes the resource as a connection string */ publishAsConnectionString(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._publishAsConnectionStringInternal()); + return new ContainerResourcePromiseImpl(this._publishAsConnectionStringInternal(), this._client); } /** @internal */ @@ -8576,12 +8656,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise { const helpLink = options?.helpLink; - return new ContainerResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink)); + return new ContainerResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -8590,13 +8671,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEnvironmentInternal(name, value)); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -8609,7 +8691,7 @@ class ContainerResourceImpl extends ResourceBuilderBase * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value)); + return new ContainerResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value), this._client); } /** @internal */ @@ -8629,12 +8711,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new ContainerResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -8646,13 +8729,14 @@ class ContainerResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference)); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -8664,13 +8748,14 @@ class ContainerResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter)); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -8682,8 +8767,8 @@ class ContainerResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource)); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ @@ -8698,7 +8783,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds arguments */ withArgs(args: string[]): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withArgsInternal(args)); + return new ContainerResourcePromiseImpl(this._withArgsInternal(args), this._client); } /** @internal */ @@ -8718,12 +8803,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new ContainerResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -8735,11 +8821,11 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ContainerResourcePromise { + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new ContainerResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new ContainerResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -8754,12 +8840,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withReferenceUriInternal(name, uri)); + return new ContainerResourcePromiseImpl(this._withReferenceUriInternal(name, uri), this._client); } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource): Promise { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -8768,13 +8855,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService)); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -8783,8 +8871,8 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference)); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -8815,7 +8903,7 @@ class ContainerResourceImpl extends ResourceBuilderBase const isProxied = options?.isProxied; const isExternal = options?.isExternal; const protocol = options?.protocol; - return new ContainerResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol)); + return new ContainerResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } /** @internal */ @@ -8840,7 +8928,7 @@ class ContainerResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new ContainerResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied)); + return new ContainerResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -8865,7 +8953,7 @@ class ContainerResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new ContainerResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied)); + return new ContainerResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -8880,7 +8968,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withExternalHttpEndpointsInternal()); + return new ContainerResourcePromiseImpl(this._withExternalHttpEndpointsInternal(), this._client); } /** Gets an endpoint reference */ @@ -8904,7 +8992,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures resource for HTTP/2 */ asHttp2Service(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._asHttp2ServiceInternal()); + return new ContainerResourcePromiseImpl(this._asHttp2ServiceInternal(), this._client); } /** @internal */ @@ -8924,7 +9012,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ContainerResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -8941,12 +9029,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ContainerResourcePromise { const displayText = options?.displayText; - return new ContainerResourcePromiseImpl(this._withUrlInternal(url, displayText)); + return new ContainerResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -8958,7 +9047,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ContainerResourcePromise { const displayText = options?.displayText; - return new ContainerResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText)); + return new ContainerResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } /** @internal */ @@ -8977,7 +9066,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ContainerResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -8997,7 +9086,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new ContainerResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ @@ -9012,12 +9101,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._excludeFromManifestInternal()); + return new ContainerResourcePromiseImpl(this._excludeFromManifestInternal(), this._client); } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -9026,13 +9116,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._waitForInternal(dependency)); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -9041,13 +9132,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior)); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -9056,13 +9148,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._waitForStartInternal(dependency)); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -9071,8 +9164,8 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior)); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -9087,12 +9180,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Prevents resource from starting automatically */ withExplicitStart(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withExplicitStartInternal()); + return new ContainerResourcePromiseImpl(this._withExplicitStartInternal(), this._client); } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, exitCode?: number): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -9102,9 +9196,9 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ContainerResourcePromise { + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise { const exitCode = options?.exitCode; - return new ContainerResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new ContainerResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -9119,7 +9213,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a health check by key */ withHealthCheck(key: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withHealthCheckInternal(key)); + return new ContainerResourcePromiseImpl(this._withHealthCheckInternal(key), this._client); } /** @internal */ @@ -9140,7 +9234,7 @@ class ContainerResourceImpl extends ResourceBuilderBase const path = options?.path; const statusCode = options?.statusCode; const endpointName = options?.endpointName; - return new ContainerResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName)); + return new ContainerResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } /** @internal */ @@ -9162,7 +9256,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise { const commandOptions = options?.commandOptions; - return new ContainerResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ContainerResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -9177,7 +9271,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust)); + return new ContainerResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust), this._client); } /** @internal */ @@ -9192,13 +9286,14 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope)); + return new ContainerResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope), this._client); } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -9209,7 +9304,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ContainerResourcePromise { const password = options?.password; - return new ContainerResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password)); + return new ContainerResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } /** @internal */ @@ -9224,12 +9319,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withoutHttpsCertificateInternal()); + return new ContainerResourcePromiseImpl(this._withoutHttpsCertificateInternal(), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -9238,13 +9334,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withParentRelationshipInternal(parent)); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -9253,8 +9350,8 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withChildRelationshipInternal(child)); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -9271,7 +9368,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise { const iconVariant = options?.iconVariant; - return new ContainerResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant)); + return new ContainerResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } /** @internal */ @@ -9300,7 +9397,7 @@ class ContainerResourceImpl extends ResourceBuilderBase const failureThreshold = options?.failureThreshold; const successThreshold = options?.successThreshold; const endpointName = options?.endpointName; - return new ContainerResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName)); + return new ContainerResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } /** @internal */ @@ -9315,7 +9412,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._excludeFromMcpInternal()); + return new ContainerResourcePromiseImpl(this._excludeFromMcpInternal(), this._client); } /** @internal */ @@ -9330,7 +9427,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName)); + return new ContainerResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName), this._client); } /** @internal */ @@ -9345,7 +9442,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag)); + return new ContainerResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag), this._client); } /** @internal */ @@ -9373,7 +9470,7 @@ class ContainerResourceImpl extends ResourceBuilderBase const requiredBy = options?.requiredBy; const tags = options?.tags; const description = options?.description; - return new ContainerResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description)); + return new ContainerResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } /** @internal */ @@ -9393,7 +9490,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ContainerResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** @internal */ @@ -9412,7 +9509,7 @@ class ContainerResourceImpl extends ResourceBuilderBase withVolume(target: string, options?: WithVolumeOptions): ContainerResourcePromise { const name = options?.name; const isReadOnly = options?.isReadOnly; - return new ContainerResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly)); + return new ContainerResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } /** Gets the resource name */ @@ -9441,7 +9538,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ContainerResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -9461,7 +9558,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ContainerResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -9481,7 +9578,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ContainerResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -9501,7 +9598,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new ContainerResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -9521,7 +9618,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ContainerResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -9540,7 +9637,7 @@ class ContainerResourceImpl extends ResourceBuilderBase withOptionalString(options?: WithOptionalStringOptions): ContainerResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new ContainerResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new ContainerResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -9555,7 +9652,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withConfigInternal(config)); + return new ContainerResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -9575,7 +9672,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new ContainerResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -9590,7 +9687,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the created timestamp */ withCreatedAt(createdAt: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new ContainerResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -9605,7 +9702,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new ContainerResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -9620,7 +9717,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the correlation ID */ withCorrelationId(correlationId: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new ContainerResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -9642,7 +9739,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ContainerResourcePromise { const callback = options?.callback; - return new ContainerResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new ContainerResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -9657,7 +9754,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the resource status */ withStatus(status: TestResourceStatus): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withStatusInternal(status)); + return new ContainerResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -9672,7 +9769,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new ContainerResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -9692,12 +9789,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ContainerResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -9706,13 +9804,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -9721,13 +9820,14 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -9736,8 +9836,8 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -9752,7 +9852,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the endpoints */ withEndpoints(endpoints: string[]): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new ContainerResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -9767,7 +9867,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets environment variables */ withEnvironmentVariables(variables: Record): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new ContainerResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -9786,7 +9886,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ContainerResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -9801,7 +9901,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a label to the resource */ withMergeLabel(label: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new ContainerResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -9816,7 +9916,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new ContainerResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -9831,7 +9931,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new ContainerResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -9846,7 +9946,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new ContainerResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -9865,7 +9965,7 @@ class ContainerResourceImpl extends ResourceBuilderBase withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ContainerResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ContainerResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new ContainerResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -9884,7 +9984,7 @@ class ContainerResourceImpl extends ResourceBuilderBase withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ContainerResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ContainerResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new ContainerResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -9899,7 +9999,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new ContainerResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -9914,7 +10014,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new ContainerResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -9925,7 +10025,9 @@ class ContainerResourceImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class ContainerResourcePromiseImpl implements ContainerResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ContainerResource) => TResult1 | PromiseLike) | null, @@ -9935,123 +10037,123 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options)), this._client); } /** Sets the container entrypoint */ withEntrypoint(entrypoint: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint)), this._client); } /** Sets the container image tag */ withImageTag(tag: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag)), this._client); } /** Sets the container image registry */ withImageRegistry(registry: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry)), this._client); } /** Sets the container image */ withImage(image: string, options?: WithImageOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options)), this._client); } /** Sets the image SHA256 digest */ withImageSHA256(sha256: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256)), this._client); } /** Adds runtime arguments for the container */ withContainerRuntimeArgs(args: string[]): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args)), this._client); } /** Sets the lifetime behavior of the container resource */ withLifetime(lifetime: ContainerLifetime): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime)), this._client); } /** Sets the container image pull policy */ withImagePullPolicy(pullPolicy: ImagePullPolicy): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy)), this._client); } /** Configures the resource to be published as a container */ publishAsContainer(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer()), this._client); } /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options)), this._client); } /** Sets the container name */ withContainerName(name: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name)), this._client); } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value))); + withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value))); + withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } /** Configures endpoint proxy support */ withEndpointProxySupport(proxyEnabled: boolean): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds a network alias for the container */ withContainerNetworkAlias(alias: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Publishes the resource as a connection string */ publishAsConnectionString(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString()), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -10059,86 +10161,86 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds arguments */ withArgs(args: string[]): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -10148,152 +10250,152 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options)), this._client); } /** Gets the resource name */ @@ -10303,147 +10405,147 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ContainerResourcePromise { - return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -10454,7 +10556,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { export interface CSharpAppResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise; withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise; withOtlpExporter(): CSharpAppResourcePromise; @@ -10463,18 +10565,18 @@ export interface CSharpAppResource { disableForwardedHeaders(): CSharpAppResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): CSharpAppResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): CSharpAppResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): CSharpAppResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; withArgs(args: string[]): CSharpAppResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): CSharpAppResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): CSharpAppResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise; withReferenceUri(name: string, uri: string): CSharpAppResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): CSharpAppResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): CSharpAppResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; withEndpoint(options?: WithEndpointOptions): CSharpAppResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): CSharpAppResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): CSharpAppResourcePromise; @@ -10486,14 +10588,14 @@ export interface CSharpAppResource { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): CSharpAppResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): CSharpAppResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): CSharpAppResourcePromise; + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise; excludeFromManifest(): CSharpAppResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; withExplicitStart(): CSharpAppResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): CSharpAppResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise; withHealthCheck(key: string): CSharpAppResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): CSharpAppResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise; @@ -10501,8 +10603,8 @@ export interface CSharpAppResource { withCertificateTrustScope(scope: CertificateTrustScope): CSharpAppResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): CSharpAppResourcePromise; withoutHttpsCertificate(): CSharpAppResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): CSharpAppResourcePromise; excludeFromMcp(): CSharpAppResourcePromise; @@ -10526,9 +10628,9 @@ export interface CSharpAppResource { withStatus(status: TestResourceStatus): CSharpAppResourcePromise; withNestedConfig(config: TestNestedDto): CSharpAppResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): CSharpAppResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; withEndpoints(endpoints: string[]): CSharpAppResourcePromise; withEnvironmentVariables(variables: Record): CSharpAppResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): CSharpAppResourcePromise; @@ -10543,7 +10645,7 @@ export interface CSharpAppResource { } export interface CSharpAppResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise; withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise; withOtlpExporter(): CSharpAppResourcePromise; @@ -10552,18 +10654,18 @@ export interface CSharpAppResourcePromise extends PromiseLike disableForwardedHeaders(): CSharpAppResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): CSharpAppResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): CSharpAppResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): CSharpAppResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; withArgs(args: string[]): CSharpAppResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): CSharpAppResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): CSharpAppResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise; withReferenceUri(name: string, uri: string): CSharpAppResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): CSharpAppResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): CSharpAppResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; withEndpoint(options?: WithEndpointOptions): CSharpAppResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): CSharpAppResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): CSharpAppResourcePromise; @@ -10575,14 +10677,14 @@ export interface CSharpAppResourcePromise extends PromiseLike withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): CSharpAppResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): CSharpAppResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): CSharpAppResourcePromise; + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise; excludeFromManifest(): CSharpAppResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; withExplicitStart(): CSharpAppResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): CSharpAppResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise; withHealthCheck(key: string): CSharpAppResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): CSharpAppResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise; @@ -10590,8 +10692,8 @@ export interface CSharpAppResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): CSharpAppResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): CSharpAppResourcePromise; withoutHttpsCertificate(): CSharpAppResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): CSharpAppResourcePromise; excludeFromMcp(): CSharpAppResourcePromise; @@ -10615,9 +10717,9 @@ export interface CSharpAppResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): CSharpAppResourcePromise; withNestedConfig(config: TestNestedDto): CSharpAppResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): CSharpAppResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; withEndpoints(endpoints: string[]): CSharpAppResourcePromise; withEnvironmentVariables(variables: Record): CSharpAppResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): CSharpAppResourcePromise; @@ -10641,8 +10743,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -10651,8 +10754,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withContainerRegistryInternal(registry)); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -10671,7 +10774,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise { const buildImage = options?.buildImage; const runtimeImage = options?.runtimeImage; - return new CSharpAppResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage)); + return new CSharpAppResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } /** @internal */ @@ -10690,7 +10793,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise { const path = options?.path; const endpointName = options?.endpointName; - return new CSharpAppResourcePromiseImpl(this._withMcpServerInternal(path, endpointName)); + return new CSharpAppResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } /** @internal */ @@ -10705,7 +10808,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export */ withOtlpExporter(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withOtlpExporterInternal()); + return new CSharpAppResourcePromiseImpl(this._withOtlpExporterInternal(), this._client); } /** @internal */ @@ -10720,7 +10823,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol)); + return new CSharpAppResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol), this._client); } /** @internal */ @@ -10735,7 +10838,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the number of replicas */ withReplicas(replicas: number): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withReplicasInternal(replicas)); + return new CSharpAppResourcePromiseImpl(this._withReplicasInternal(replicas), this._client); } /** @internal */ @@ -10750,7 +10853,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Disables forwarded headers for the project */ disableForwardedHeaders(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._disableForwardedHeadersInternal()); + return new CSharpAppResourcePromiseImpl(this._disableForwardedHeadersInternal(), this._client); } /** @internal */ @@ -10772,7 +10875,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise { const configure = options?.configure; - return new CSharpAppResourcePromiseImpl(this._publishAsDockerFileInternal(configure)); + return new CSharpAppResourcePromiseImpl(this._publishAsDockerFileInternal(configure), this._client); } /** @internal */ @@ -10789,12 +10892,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise { const helpLink = options?.helpLink; - return new CSharpAppResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink)); + return new CSharpAppResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -10803,13 +10907,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEnvironmentInternal(name, value)); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -10822,7 +10927,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value)); + return new CSharpAppResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value), this._client); } /** @internal */ @@ -10842,12 +10947,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -10859,13 +10965,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference)); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -10877,13 +10984,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter)); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -10895,8 +11003,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource)); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ @@ -10911,7 +11019,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds arguments */ withArgs(args: string[]): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withArgsInternal(args)); + return new CSharpAppResourcePromiseImpl(this._withArgsInternal(args), this._client); } /** @internal */ @@ -10931,12 +11039,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -10948,11 +11057,11 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): CSharpAppResourcePromise { + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new CSharpAppResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new CSharpAppResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -10967,12 +11076,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withReferenceUriInternal(name, uri)); + return new CSharpAppResourcePromiseImpl(this._withReferenceUriInternal(name, uri), this._client); } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource): Promise { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -10981,13 +11091,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService)); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -10996,8 +11107,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference)); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -11028,7 +11139,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase const isProxied = options?.isProxied; const isExternal = options?.isExternal; const protocol = options?.protocol; - return new CSharpAppResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol)); + return new CSharpAppResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } /** @internal */ @@ -11053,7 +11164,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new CSharpAppResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied)); + return new CSharpAppResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -11078,7 +11189,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new CSharpAppResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied)); + return new CSharpAppResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -11093,7 +11204,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withExternalHttpEndpointsInternal()); + return new CSharpAppResourcePromiseImpl(this._withExternalHttpEndpointsInternal(), this._client); } /** Gets an endpoint reference */ @@ -11117,7 +11228,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures resource for HTTP/2 */ asHttp2Service(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._asHttp2ServiceInternal()); + return new CSharpAppResourcePromiseImpl(this._asHttp2ServiceInternal(), this._client); } /** @internal */ @@ -11137,7 +11248,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -11154,12 +11265,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): CSharpAppResourcePromise { const displayText = options?.displayText; - return new CSharpAppResourcePromiseImpl(this._withUrlInternal(url, displayText)); + return new CSharpAppResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -11171,7 +11283,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise { const displayText = options?.displayText; - return new CSharpAppResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText)); + return new CSharpAppResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } /** @internal */ @@ -11190,7 +11302,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new CSharpAppResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -11210,12 +11322,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new CSharpAppResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ - private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles, destinationPath: string): Promise { - const rpcArgs: Record = { builder: this._handle, source, destinationPath }; + private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved, destinationPath }; const result = await this._client.invokeCapability( 'Aspire.Hosting/publishWithContainerFilesFromResource', rpcArgs @@ -11224,8 +11337,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath)); + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath), this._client); } /** @internal */ @@ -11240,12 +11353,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Excludes the resource from the deployment manifest */ excludeFromManifest(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._excludeFromManifestInternal()); + return new CSharpAppResourcePromiseImpl(this._excludeFromManifestInternal(), this._client); } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -11254,13 +11368,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._waitForInternal(dependency)); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -11269,13 +11384,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior)); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -11284,13 +11400,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._waitForStartInternal(dependency)); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -11299,8 +11416,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior)); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -11315,12 +11432,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Prevents resource from starting automatically */ withExplicitStart(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withExplicitStartInternal()); + return new CSharpAppResourcePromiseImpl(this._withExplicitStartInternal(), this._client); } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, exitCode?: number): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -11330,9 +11448,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): CSharpAppResourcePromise { + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise { const exitCode = options?.exitCode; - return new CSharpAppResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new CSharpAppResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -11347,7 +11465,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a health check by key */ withHealthCheck(key: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withHealthCheckInternal(key)); + return new CSharpAppResourcePromiseImpl(this._withHealthCheckInternal(key), this._client); } /** @internal */ @@ -11368,7 +11486,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase const path = options?.path; const statusCode = options?.statusCode; const endpointName = options?.endpointName; - return new CSharpAppResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName)); + return new CSharpAppResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } /** @internal */ @@ -11390,7 +11508,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise { const commandOptions = options?.commandOptions; - return new CSharpAppResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new CSharpAppResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -11405,7 +11523,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust)); + return new CSharpAppResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust), this._client); } /** @internal */ @@ -11420,13 +11538,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope)); + return new CSharpAppResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope), this._client); } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -11437,7 +11556,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): CSharpAppResourcePromise { const password = options?.password; - return new CSharpAppResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password)); + return new CSharpAppResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } /** @internal */ @@ -11452,12 +11571,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withoutHttpsCertificateInternal()); + return new CSharpAppResourcePromiseImpl(this._withoutHttpsCertificateInternal(), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -11466,13 +11586,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withParentRelationshipInternal(parent)); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -11481,8 +11602,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withChildRelationshipInternal(child)); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -11499,7 +11620,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise { const iconVariant = options?.iconVariant; - return new CSharpAppResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant)); + return new CSharpAppResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } /** @internal */ @@ -11528,7 +11649,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase const failureThreshold = options?.failureThreshold; const successThreshold = options?.successThreshold; const endpointName = options?.endpointName; - return new CSharpAppResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName)); + return new CSharpAppResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } /** @internal */ @@ -11543,7 +11664,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Excludes the resource from MCP server exposure */ excludeFromMcp(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._excludeFromMcpInternal()); + return new CSharpAppResourcePromiseImpl(this._excludeFromMcpInternal(), this._client); } /** @internal */ @@ -11558,7 +11679,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName)); + return new CSharpAppResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName), this._client); } /** @internal */ @@ -11573,7 +11694,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag)); + return new CSharpAppResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag), this._client); } /** @internal */ @@ -11601,7 +11722,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase const requiredBy = options?.requiredBy; const tags = options?.tags; const description = options?.description; - return new CSharpAppResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description)); + return new CSharpAppResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } /** @internal */ @@ -11621,7 +11742,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -11650,7 +11771,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -11670,7 +11791,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -11690,7 +11811,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -11710,7 +11831,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -11730,7 +11851,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -11749,7 +11870,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase withOptionalString(options?: WithOptionalStringOptions): CSharpAppResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new CSharpAppResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new CSharpAppResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -11764,7 +11885,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withConfigInternal(config)); + return new CSharpAppResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -11784,7 +11905,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -11799,7 +11920,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the created timestamp */ withCreatedAt(createdAt: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new CSharpAppResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -11814,7 +11935,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new CSharpAppResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -11829,7 +11950,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the correlation ID */ withCorrelationId(correlationId: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new CSharpAppResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -11851,7 +11972,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): CSharpAppResourcePromise { const callback = options?.callback; - return new CSharpAppResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new CSharpAppResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -11866,7 +11987,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the resource status */ withStatus(status: TestResourceStatus): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withStatusInternal(status)); + return new CSharpAppResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -11881,7 +12002,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new CSharpAppResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -11901,12 +12022,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withValidatorInternal(validator)); + return new CSharpAppResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -11915,13 +12037,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -11930,13 +12053,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -11945,8 +12069,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -11961,7 +12085,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the endpoints */ withEndpoints(endpoints: string[]): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new CSharpAppResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -11976,7 +12100,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets environment variables */ withEnvironmentVariables(variables: Record): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new CSharpAppResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -11995,7 +12119,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new CSharpAppResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -12010,7 +12134,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a label to the resource */ withMergeLabel(label: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new CSharpAppResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -12025,7 +12149,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new CSharpAppResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -12040,7 +12164,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new CSharpAppResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -12055,7 +12179,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new CSharpAppResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -12074,7 +12198,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): CSharpAppResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new CSharpAppResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new CSharpAppResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -12093,7 +12217,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): CSharpAppResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new CSharpAppResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new CSharpAppResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -12108,7 +12232,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new CSharpAppResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -12123,7 +12247,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new CSharpAppResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -12134,7 +12258,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: CSharpAppResource) => TResult1 | PromiseLike) | null, @@ -12144,53 +12270,53 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Sets the number of replicas */ withReplicas(replicas: number): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReplicas(replicas))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReplicas(replicas)), this._client); } /** Disables forwarded headers for the project */ disableForwardedHeaders(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.disableForwardedHeaders())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.disableForwardedHeaders()), this._client); } /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile(options)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -12198,86 +12324,86 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds arguments */ withArgs(args: string[]): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -12287,152 +12413,152 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath))); + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -12442,147 +12568,147 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): CSharpAppResourcePromise { - return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -12593,7 +12719,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { export interface DotnetToolResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): DotnetToolResourcePromise; withToolPackage(packageId: string): DotnetToolResourcePromise; withToolVersion(version: string): DotnetToolResourcePromise; @@ -12609,18 +12735,18 @@ export interface DotnetToolResource { withOtlpExporter(): DotnetToolResourcePromise; withOtlpExporterProtocol(protocol: OtlpProtocol): DotnetToolResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): DotnetToolResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): DotnetToolResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): DotnetToolResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): DotnetToolResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): DotnetToolResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): DotnetToolResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): DotnetToolResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; withArgs(args: string[]): DotnetToolResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): DotnetToolResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): DotnetToolResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): DotnetToolResourcePromise; withReferenceUri(name: string, uri: string): DotnetToolResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): DotnetToolResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): DotnetToolResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): DotnetToolResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; withEndpoint(options?: WithEndpointOptions): DotnetToolResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): DotnetToolResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): DotnetToolResourcePromise; @@ -12633,12 +12759,12 @@ export interface DotnetToolResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): DotnetToolResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): DotnetToolResourcePromise; excludeFromManifest(): DotnetToolResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): DotnetToolResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; withExplicitStart(): DotnetToolResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): DotnetToolResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): DotnetToolResourcePromise; withHealthCheck(key: string): DotnetToolResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): DotnetToolResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): DotnetToolResourcePromise; @@ -12646,8 +12772,8 @@ export interface DotnetToolResource { withCertificateTrustScope(scope: CertificateTrustScope): DotnetToolResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): DotnetToolResourcePromise; withoutHttpsCertificate(): DotnetToolResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): DotnetToolResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): DotnetToolResourcePromise; excludeFromMcp(): DotnetToolResourcePromise; @@ -12671,9 +12797,9 @@ export interface DotnetToolResource { withStatus(status: TestResourceStatus): DotnetToolResourcePromise; withNestedConfig(config: TestNestedDto): DotnetToolResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): DotnetToolResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; withEndpoints(endpoints: string[]): DotnetToolResourcePromise; withEnvironmentVariables(variables: Record): DotnetToolResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): DotnetToolResourcePromise; @@ -12688,7 +12814,7 @@ export interface DotnetToolResource { } export interface DotnetToolResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): DotnetToolResourcePromise; withToolPackage(packageId: string): DotnetToolResourcePromise; withToolVersion(version: string): DotnetToolResourcePromise; @@ -12704,18 +12830,18 @@ export interface DotnetToolResourcePromise extends PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): DotnetToolResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): DotnetToolResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): DotnetToolResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): DotnetToolResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): DotnetToolResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; withArgs(args: string[]): DotnetToolResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): DotnetToolResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): DotnetToolResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): DotnetToolResourcePromise; withReferenceUri(name: string, uri: string): DotnetToolResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): DotnetToolResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): DotnetToolResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): DotnetToolResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; withEndpoint(options?: WithEndpointOptions): DotnetToolResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): DotnetToolResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): DotnetToolResourcePromise; @@ -12728,12 +12854,12 @@ export interface DotnetToolResourcePromise extends PromiseLike Promise): DotnetToolResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): DotnetToolResourcePromise; excludeFromManifest(): DotnetToolResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): DotnetToolResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; withExplicitStart(): DotnetToolResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): DotnetToolResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): DotnetToolResourcePromise; withHealthCheck(key: string): DotnetToolResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): DotnetToolResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): DotnetToolResourcePromise; @@ -12741,8 +12867,8 @@ export interface DotnetToolResourcePromise extends PromiseLike): DotnetToolResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): DotnetToolResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): DotnetToolResourcePromise; excludeFromMcp(): DotnetToolResourcePromise; @@ -12766,9 +12892,9 @@ export interface DotnetToolResourcePromise extends PromiseLike Promise): DotnetToolResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; withEndpoints(endpoints: string[]): DotnetToolResourcePromise; withEnvironmentVariables(variables: Record): DotnetToolResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): DotnetToolResourcePromise; @@ -12792,8 +12918,9 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -12802,8 +12929,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -12822,7 +12949,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._publishAsDockerFileWithConfigureInternal(configure)); + return new DotnetToolResourcePromiseImpl(this._publishAsDockerFileWithConfigureInternal(configure), this._client); } /** @internal */ @@ -12962,7 +13089,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -13057,13 +13185,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -13076,7 +13205,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -13113,13 +13243,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -13131,13 +13262,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -13149,8 +13281,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ @@ -13165,7 +13297,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -13202,11 +13335,11 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): DotnetToolResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new DotnetToolResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new DotnetToolResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -13221,12 +13354,13 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -13235,13 +13369,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -13250,8 +13385,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -13282,7 +13417,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -13408,12 +13543,13 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -13425,7 +13561,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new DotnetToolResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -13464,7 +13600,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new DotnetToolResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ @@ -13479,12 +13615,13 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -13493,13 +13630,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -13508,13 +13646,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -13523,13 +13662,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -13538,8 +13678,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -13554,12 +13694,13 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -13569,9 +13710,9 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): DotnetToolResourcePromise { const exitCode = options?.exitCode; - return new DotnetToolResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new DotnetToolResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -13586,7 +13727,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): DotnetToolResourcePromise { const commandOptions = options?.commandOptions; - return new DotnetToolResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new DotnetToolResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -13644,7 +13785,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -13676,7 +13818,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -13705,13 +13848,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -13720,8 +13864,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -13738,7 +13882,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -13889,7 +14033,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -13909,7 +14053,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -13929,7 +14073,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -13949,7 +14093,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -13969,7 +14113,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -13988,7 +14132,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new DotnetToolResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -14038,7 +14182,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withValidatorInternal(validator)); + return new DotnetToolResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -14154,13 +14299,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -14169,13 +14315,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -14184,8 +14331,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -14200,7 +14347,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new DotnetToolResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -14234,7 +14381,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new DotnetToolResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -14249,7 +14396,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: DotnetToolResource) => TResult1 | PromiseLike) | null, @@ -14383,88 +14532,88 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Sets the tool package ID */ withToolPackage(packageId: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolPackage(packageId))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolPackage(packageId)), this._client); } /** Sets the tool version */ withToolVersion(version: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolVersion(version))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolVersion(version)), this._client); } /** Allows prerelease tool versions */ withToolPrerelease(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolPrerelease())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolPrerelease()), this._client); } /** Adds a NuGet source for the tool */ withToolSource(source: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolSource(source))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolSource(source)), this._client); } /** Ignores existing NuGet feeds */ withToolIgnoreExistingFeeds(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolIgnoreExistingFeeds())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolIgnoreExistingFeeds()), this._client); } /** Ignores failed NuGet sources */ withToolIgnoreFailedSources(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolIgnoreFailedSources())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withToolIgnoreFailedSources()), this._client); } /** Publishes the executable as a Docker container */ publishAsDockerFile(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile()), this._client); } /** Publishes an executable as a Docker file with optional container configuration */ publishAsDockerFileWithConfigure(configure: (obj: ContainerResource) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFileWithConfigure(configure))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFileWithConfigure(configure)), this._client); } /** Sets the executable command */ withExecutableCommand(command: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withExecutableCommand(command))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withExecutableCommand(command)), this._client); } /** Sets the executable working directory */ withWorkingDirectory(workingDirectory: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withWorkingDirectory(workingDirectory))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withWorkingDirectory(workingDirectory)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -14472,86 +14621,86 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds arguments */ withArgs(args: string[]): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -14561,147 +14710,147 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -14711,147 +14860,147 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise { + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): DotnetToolResourcePromise { - return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -14862,7 +15011,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { export interface ExecutableResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExecutableResourcePromise; publishAsDockerFile(): ExecutableResourcePromise; publishAsDockerFileWithConfigure(configure: (obj: ContainerResource) => Promise): ExecutableResourcePromise; @@ -14872,18 +15021,18 @@ export interface ExecutableResource { withOtlpExporter(): ExecutableResourcePromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ExecutableResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExecutableResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ExecutableResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ExecutableResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ExecutableResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ExecutableResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ExecutableResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ExecutableResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; withArgs(args: string[]): ExecutableResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ExecutableResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ExecutableResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ExecutableResourcePromise; withReferenceUri(name: string, uri: string): ExecutableResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): ExecutableResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): ExecutableResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ExecutableResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; withEndpoint(options?: WithEndpointOptions): ExecutableResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ExecutableResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ExecutableResourcePromise; @@ -14896,12 +15045,12 @@ export interface ExecutableResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ExecutableResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ExecutableResourcePromise; excludeFromManifest(): ExecutableResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ExecutableResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; withExplicitStart(): ExecutableResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ExecutableResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ExecutableResourcePromise; withHealthCheck(key: string): ExecutableResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ExecutableResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExecutableResourcePromise; @@ -14909,8 +15058,8 @@ export interface ExecutableResource { withCertificateTrustScope(scope: CertificateTrustScope): ExecutableResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ExecutableResourcePromise; withoutHttpsCertificate(): ExecutableResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExecutableResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ExecutableResourcePromise; excludeFromMcp(): ExecutableResourcePromise; @@ -14934,9 +15083,9 @@ export interface ExecutableResource { withStatus(status: TestResourceStatus): ExecutableResourcePromise; withNestedConfig(config: TestNestedDto): ExecutableResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ExecutableResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; withEndpoints(endpoints: string[]): ExecutableResourcePromise; withEnvironmentVariables(variables: Record): ExecutableResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExecutableResourcePromise; @@ -14951,7 +15100,7 @@ export interface ExecutableResource { } export interface ExecutableResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExecutableResourcePromise; publishAsDockerFile(): ExecutableResourcePromise; publishAsDockerFileWithConfigure(configure: (obj: ContainerResource) => Promise): ExecutableResourcePromise; @@ -14961,18 +15110,18 @@ export interface ExecutableResourcePromise extends PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ExecutableResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ExecutableResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ExecutableResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ExecutableResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ExecutableResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; withArgs(args: string[]): ExecutableResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ExecutableResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ExecutableResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ExecutableResourcePromise; withReferenceUri(name: string, uri: string): ExecutableResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): ExecutableResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): ExecutableResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ExecutableResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; withEndpoint(options?: WithEndpointOptions): ExecutableResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ExecutableResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ExecutableResourcePromise; @@ -14985,12 +15134,12 @@ export interface ExecutableResourcePromise extends PromiseLike Promise): ExecutableResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ExecutableResourcePromise; excludeFromManifest(): ExecutableResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ExecutableResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; withExplicitStart(): ExecutableResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ExecutableResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ExecutableResourcePromise; withHealthCheck(key: string): ExecutableResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ExecutableResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExecutableResourcePromise; @@ -14998,8 +15147,8 @@ export interface ExecutableResourcePromise extends PromiseLike): ExecutableResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExecutableResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ExecutableResourcePromise; excludeFromMcp(): ExecutableResourcePromise; @@ -15023,9 +15172,9 @@ export interface ExecutableResourcePromise extends PromiseLike Promise): ExecutableResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; withEndpoints(endpoints: string[]): ExecutableResourcePromise; withEnvironmentVariables(variables: Record): ExecutableResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExecutableResourcePromise; @@ -15049,8 +15198,9 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -15059,8 +15209,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -15079,7 +15229,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._publishAsDockerFileWithConfigureInternal(configure)); + return new ExecutableResourcePromiseImpl(this._publishAsDockerFileWithConfigureInternal(configure), this._client); } /** @internal */ @@ -15129,7 +15279,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -15224,13 +15375,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -15243,7 +15395,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new ExecutableResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -15280,13 +15433,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -15298,13 +15452,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -15316,8 +15471,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ @@ -15332,7 +15487,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new ExecutableResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -15369,11 +15525,11 @@ class ExecutableResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ExecutableResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new ExecutableResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new ExecutableResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -15388,12 +15544,13 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -15402,13 +15559,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -15417,8 +15575,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -15449,7 +15607,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ExecutableResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -15575,12 +15733,13 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -15592,7 +15751,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ExecutableResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -15631,7 +15790,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new ExecutableResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ @@ -15646,12 +15805,13 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -15660,13 +15820,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -15675,13 +15836,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -15690,13 +15852,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -15705,8 +15868,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -15721,12 +15884,13 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -15736,9 +15900,9 @@ class ExecutableResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ExecutableResourcePromise { const exitCode = options?.exitCode; - return new ExecutableResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new ExecutableResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -15753,7 +15917,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ExecutableResourcePromise { const commandOptions = options?.commandOptions; - return new ExecutableResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ExecutableResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -15811,7 +15975,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -15843,7 +16008,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -15872,13 +16038,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -15887,8 +16054,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -15905,7 +16072,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ExecutableResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -16056,7 +16223,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ExecutableResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -16076,7 +16243,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ExecutableResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -16096,7 +16263,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ExecutableResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -16116,7 +16283,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new ExecutableResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -16136,7 +16303,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ExecutableResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -16155,7 +16322,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new ExecutableResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -16205,7 +16372,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ExecutableResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -16321,13 +16489,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -16336,13 +16505,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -16351,8 +16521,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -16367,7 +16537,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new ExecutableResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -16401,7 +16571,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ExecutableResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -16416,7 +16586,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ExecutableResource) => TResult1 | PromiseLike) | null, @@ -16550,58 +16722,58 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Publishes the executable as a Docker container */ publishAsDockerFile(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile()), this._client); } /** Publishes an executable as a Docker file with optional container configuration */ publishAsDockerFileWithConfigure(configure: (obj: ContainerResource) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFileWithConfigure(configure))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFileWithConfigure(configure)), this._client); } /** Sets the executable command */ withExecutableCommand(command: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withExecutableCommand(command))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withExecutableCommand(command)), this._client); } /** Sets the executable working directory */ withWorkingDirectory(workingDirectory: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withWorkingDirectory(workingDirectory))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withWorkingDirectory(workingDirectory)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -16609,86 +16781,86 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds arguments */ withArgs(args: string[]): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -16698,147 +16870,147 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -16848,147 +17020,147 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise { + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ExecutableResourcePromise { - return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -16999,7 +17171,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { export interface ExternalServiceResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExternalServiceResourcePromise; withExternalServiceHttpHealthCheck(options?: WithExternalServiceHttpHealthCheckOptions): ExternalServiceResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExternalServiceResourcePromise; @@ -17011,8 +17183,8 @@ export interface ExternalServiceResource { withExplicitStart(): ExternalServiceResourcePromise; withHealthCheck(key: string): ExternalServiceResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExternalServiceResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExternalServiceResourcePromise; excludeFromMcp(): ExternalServiceResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ExternalServiceResourcePromise; @@ -17031,9 +17203,9 @@ export interface ExternalServiceResource { withStatus(status: TestResourceStatus): ExternalServiceResourcePromise; withNestedConfig(config: TestNestedDto): ExternalServiceResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ExternalServiceResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExternalServiceResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExternalServiceResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; withEndpoints(endpoints: string[]): ExternalServiceResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExternalServiceResourcePromise; withMergeLabel(label: string): ExternalServiceResourcePromise; @@ -17047,7 +17219,7 @@ export interface ExternalServiceResource { } export interface ExternalServiceResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExternalServiceResourcePromise; withExternalServiceHttpHealthCheck(options?: WithExternalServiceHttpHealthCheckOptions): ExternalServiceResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExternalServiceResourcePromise; @@ -17059,8 +17231,8 @@ export interface ExternalServiceResourcePromise extends PromiseLike Promise, options?: WithCommandOptions): ExternalServiceResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExternalServiceResourcePromise; excludeFromMcp(): ExternalServiceResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ExternalServiceResourcePromise; @@ -17079,9 +17251,9 @@ export interface ExternalServiceResourcePromise extends PromiseLike Promise): ExternalServiceResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExternalServiceResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExternalServiceResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; withEndpoints(endpoints: string[]): ExternalServiceResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExternalServiceResourcePromise; withMergeLabel(label: string): ExternalServiceResourcePromise; @@ -17104,8 +17276,9 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -17114,8 +17287,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -17134,7 +17307,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ExternalServiceResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -17207,12 +17380,13 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -17224,7 +17398,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ExternalServiceResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -17258,7 +17432,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ExternalServiceResourcePromise { const commandOptions = options?.commandOptions; - return new ExternalServiceResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ExternalServiceResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -17324,13 +17499,14 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -17339,8 +17515,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -17357,7 +17533,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ExternalServiceResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -17449,7 +17625,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ExternalServiceResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -17469,7 +17645,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ExternalServiceResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -17489,7 +17665,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ExternalServiceResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -17509,7 +17685,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ExternalServiceResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -17528,7 +17704,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ExternalServiceResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -17674,13 +17851,14 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -17689,13 +17867,14 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -17704,8 +17883,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -17720,7 +17899,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ExternalServiceResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -17754,7 +17933,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ExternalServiceResource) => TResult1 | PromiseLike) | null, @@ -17888,93 +18069,93 @@ class ExternalServiceResourcePromiseImpl implements ExternalServiceResourcePromi } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds an HTTP health check to an external service */ withExternalServiceHttpHealthCheck(options?: WithExternalServiceHttpHealthCheckOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withExternalServiceHttpHealthCheck(options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withExternalServiceHttpHealthCheck(options)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -17984,132 +18165,132 @@ class ExternalServiceResourcePromiseImpl implements ExternalServiceResourcePromi /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise { + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ExternalServiceResourcePromise { - return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -18120,7 +18301,7 @@ class ExternalServiceResourcePromiseImpl implements ExternalServiceResourcePromi export interface ParameterResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise; withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise; @@ -18132,8 +18313,8 @@ export interface ParameterResource { withExplicitStart(): ParameterResourcePromise; withHealthCheck(key: string): ParameterResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise; excludeFromMcp(): ParameterResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ParameterResourcePromise; @@ -18152,9 +18333,9 @@ export interface ParameterResource { withStatus(status: TestResourceStatus): ParameterResourcePromise; withNestedConfig(config: TestNestedDto): ParameterResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ParameterResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; withEndpoints(endpoints: string[]): ParameterResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ParameterResourcePromise; withMergeLabel(label: string): ParameterResourcePromise; @@ -18168,7 +18349,7 @@ export interface ParameterResource { } export interface ParameterResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise; withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise; @@ -18180,8 +18361,8 @@ export interface ParameterResourcePromise extends PromiseLike withExplicitStart(): ParameterResourcePromise; withHealthCheck(key: string): ParameterResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise; excludeFromMcp(): ParameterResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ParameterResourcePromise; @@ -18200,9 +18381,9 @@ export interface ParameterResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): ParameterResourcePromise; withNestedConfig(config: TestNestedDto): ParameterResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ParameterResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; withEndpoints(endpoints: string[]): ParameterResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ParameterResourcePromise; withMergeLabel(label: string): ParameterResourcePromise; @@ -18225,8 +18406,9 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -18235,8 +18417,8 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withContainerRegistryInternal(registry)); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -18255,7 +18437,7 @@ class ParameterResourceImpl extends ResourceBuilderBase withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise { const buildImage = options?.buildImage; const runtimeImage = options?.runtimeImage; - return new ParameterResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage)); + return new ParameterResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } /** @internal */ @@ -18272,7 +18454,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets a parameter description */ withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise { const enableMarkdown = options?.enableMarkdown; - return new ParameterResourcePromiseImpl(this._withDescriptionInternal(description, enableMarkdown)); + return new ParameterResourcePromiseImpl(this._withDescriptionInternal(description, enableMarkdown), this._client); } /** @internal */ @@ -18289,7 +18471,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise { const helpLink = options?.helpLink; - return new ParameterResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink)); + return new ParameterResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ @@ -18309,7 +18491,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ParameterResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -18326,12 +18508,13 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ParameterResourcePromise { const displayText = options?.displayText; - return new ParameterResourcePromiseImpl(this._withUrlInternal(url, displayText)); + return new ParameterResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -18343,7 +18526,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ParameterResourcePromise { const displayText = options?.displayText; - return new ParameterResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText)); + return new ParameterResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } /** @internal */ @@ -18362,7 +18545,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ParameterResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -18377,7 +18560,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._excludeFromManifestInternal()); + return new ParameterResourcePromiseImpl(this._excludeFromManifestInternal(), this._client); } /** @internal */ @@ -18392,7 +18575,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Prevents resource from starting automatically */ withExplicitStart(): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withExplicitStartInternal()); + return new ParameterResourcePromiseImpl(this._withExplicitStartInternal(), this._client); } /** @internal */ @@ -18407,7 +18590,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a health check by key */ withHealthCheck(key: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withHealthCheckInternal(key)); + return new ParameterResourcePromiseImpl(this._withHealthCheckInternal(key), this._client); } /** @internal */ @@ -18429,12 +18612,13 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise { const commandOptions = options?.commandOptions; - return new ParameterResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ParameterResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -18443,13 +18627,14 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withParentRelationshipInternal(parent)); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -18458,8 +18643,8 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withChildRelationshipInternal(child)); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -18476,7 +18661,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise { const iconVariant = options?.iconVariant; - return new ParameterResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant)); + return new ParameterResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } /** @internal */ @@ -18491,7 +18676,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._excludeFromMcpInternal()); + return new ParameterResourcePromiseImpl(this._excludeFromMcpInternal(), this._client); } /** @internal */ @@ -18519,7 +18704,7 @@ class ParameterResourceImpl extends ResourceBuilderBase const requiredBy = options?.requiredBy; const tags = options?.tags; const description = options?.description; - return new ParameterResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description)); + return new ParameterResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } /** @internal */ @@ -18539,7 +18724,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ParameterResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -18568,7 +18753,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ParameterResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -18588,7 +18773,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ParameterResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -18608,7 +18793,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ParameterResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -18628,7 +18813,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ParameterResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -18647,7 +18832,7 @@ class ParameterResourceImpl extends ResourceBuilderBase withOptionalString(options?: WithOptionalStringOptions): ParameterResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new ParameterResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new ParameterResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -18662,7 +18847,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withConfigInternal(config)); + return new ParameterResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -18677,7 +18862,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the created timestamp */ withCreatedAt(createdAt: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new ParameterResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -18692,7 +18877,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new ParameterResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -18707,7 +18892,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the correlation ID */ withCorrelationId(correlationId: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new ParameterResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -18729,7 +18914,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ParameterResourcePromise { const callback = options?.callback; - return new ParameterResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new ParameterResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -18744,7 +18929,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the resource status */ withStatus(status: TestResourceStatus): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withStatusInternal(status)); + return new ParameterResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -18759,7 +18944,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new ParameterResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -18779,12 +18964,13 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ParameterResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -18793,13 +18979,14 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -18808,13 +18995,14 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -18823,8 +19011,8 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -18839,7 +19027,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the endpoints */ withEndpoints(endpoints: string[]): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new ParameterResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -18858,7 +19046,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ParameterResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -18873,7 +19061,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a label to the resource */ withMergeLabel(label: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new ParameterResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -18888,7 +19076,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new ParameterResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -18903,7 +19091,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new ParameterResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -18918,7 +19106,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new ParameterResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -18937,7 +19125,7 @@ class ParameterResourceImpl extends ResourceBuilderBase withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ParameterResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ParameterResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new ParameterResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -18956,7 +19144,7 @@ class ParameterResourceImpl extends ResourceBuilderBase withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ParameterResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ParameterResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new ParameterResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -18971,7 +19159,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new ParameterResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -18986,7 +19174,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new ParameterResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -18997,7 +19185,9 @@ class ParameterResourceImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class ParameterResourcePromiseImpl implements ParameterResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ParameterResource) => TResult1 | PromiseLike) | null, @@ -19007,93 +19197,93 @@ class ParameterResourcePromiseImpl implements ParameterResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Sets a parameter description */ withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withDescription(description, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withDescription(description, options)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -19103,132 +19293,132 @@ class ParameterResourcePromiseImpl implements ParameterResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ParameterResourcePromise { - return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -19239,7 +19429,7 @@ class ParameterResourcePromiseImpl implements ParameterResourcePromise { export interface ProjectResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise; withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise; withOtlpExporter(): ProjectResourcePromise; @@ -19248,18 +19438,18 @@ export interface ProjectResource { disableForwardedHeaders(): ProjectResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ProjectResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ProjectResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ProjectResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; withArgs(args: string[]): ProjectResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ProjectResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ProjectResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise; withReferenceUri(name: string, uri: string): ProjectResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): ProjectResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): ProjectResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; withEndpoint(options?: WithEndpointOptions): ProjectResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ProjectResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ProjectResourcePromise; @@ -19271,14 +19461,14 @@ export interface ProjectResource { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ProjectResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ProjectResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): ProjectResourcePromise; + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise; excludeFromManifest(): ProjectResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; withExplicitStart(): ProjectResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ProjectResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise; withHealthCheck(key: string): ProjectResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ProjectResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise; @@ -19286,8 +19476,8 @@ export interface ProjectResource { withCertificateTrustScope(scope: CertificateTrustScope): ProjectResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ProjectResourcePromise; withoutHttpsCertificate(): ProjectResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ProjectResourcePromise; excludeFromMcp(): ProjectResourcePromise; @@ -19311,9 +19501,9 @@ export interface ProjectResource { withStatus(status: TestResourceStatus): ProjectResourcePromise; withNestedConfig(config: TestNestedDto): ProjectResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ProjectResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; withEndpoints(endpoints: string[]): ProjectResourcePromise; withEnvironmentVariables(variables: Record): ProjectResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ProjectResourcePromise; @@ -19328,7 +19518,7 @@ export interface ProjectResource { } export interface ProjectResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise; withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise; withOtlpExporter(): ProjectResourcePromise; @@ -19337,18 +19527,18 @@ export interface ProjectResourcePromise extends PromiseLike { disableForwardedHeaders(): ProjectResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ProjectResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ProjectResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ProjectResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; withArgs(args: string[]): ProjectResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ProjectResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ProjectResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise; withReferenceUri(name: string, uri: string): ProjectResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): ProjectResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): ProjectResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; withEndpoint(options?: WithEndpointOptions): ProjectResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ProjectResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ProjectResourcePromise; @@ -19360,14 +19550,14 @@ export interface ProjectResourcePromise extends PromiseLike { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ProjectResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ProjectResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): ProjectResourcePromise; + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise; excludeFromManifest(): ProjectResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; withExplicitStart(): ProjectResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ProjectResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise; withHealthCheck(key: string): ProjectResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ProjectResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise; @@ -19375,8 +19565,8 @@ export interface ProjectResourcePromise extends PromiseLike { withCertificateTrustScope(scope: CertificateTrustScope): ProjectResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ProjectResourcePromise; withoutHttpsCertificate(): ProjectResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ProjectResourcePromise; excludeFromMcp(): ProjectResourcePromise; @@ -19400,9 +19590,9 @@ export interface ProjectResourcePromise extends PromiseLike { withStatus(status: TestResourceStatus): ProjectResourcePromise; withNestedConfig(config: TestNestedDto): ProjectResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ProjectResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; withEndpoints(endpoints: string[]): ProjectResourcePromise; withEnvironmentVariables(variables: Record): ProjectResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ProjectResourcePromise; @@ -19426,8 +19616,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -19436,8 +19627,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withContainerRegistryInternal(registry)); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -19456,7 +19647,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise { const buildImage = options?.buildImage; const runtimeImage = options?.runtimeImage; - return new ProjectResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage)); + return new ProjectResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } /** @internal */ @@ -19475,7 +19666,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise { const path = options?.path; const endpointName = options?.endpointName; - return new ProjectResourcePromiseImpl(this._withMcpServerInternal(path, endpointName)); + return new ProjectResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } /** @internal */ @@ -19490,7 +19681,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures OTLP telemetry export */ withOtlpExporter(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withOtlpExporterInternal()); + return new ProjectResourcePromiseImpl(this._withOtlpExporterInternal(), this._client); } /** @internal */ @@ -19505,7 +19696,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol)); + return new ProjectResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol), this._client); } /** @internal */ @@ -19520,7 +19711,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the number of replicas */ withReplicas(replicas: number): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withReplicasInternal(replicas)); + return new ProjectResourcePromiseImpl(this._withReplicasInternal(replicas), this._client); } /** @internal */ @@ -19535,7 +19726,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Disables forwarded headers for the project */ disableForwardedHeaders(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._disableForwardedHeadersInternal()); + return new ProjectResourcePromiseImpl(this._disableForwardedHeadersInternal(), this._client); } /** @internal */ @@ -19557,7 +19748,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise { const configure = options?.configure; - return new ProjectResourcePromiseImpl(this._publishAsDockerFileInternal(configure)); + return new ProjectResourcePromiseImpl(this._publishAsDockerFileInternal(configure), this._client); } /** @internal */ @@ -19574,12 +19765,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise { const helpLink = options?.helpLink; - return new ProjectResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink)); + return new ProjectResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -19588,13 +19780,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEnvironmentInternal(name, value)); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -19607,7 +19800,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value)); + return new ProjectResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value), this._client); } /** @internal */ @@ -19627,12 +19820,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new ProjectResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -19644,13 +19838,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference)); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -19662,13 +19857,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter)); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -19680,8 +19876,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource)); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ @@ -19696,7 +19892,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds arguments */ withArgs(args: string[]): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withArgsInternal(args)); + return new ProjectResourcePromiseImpl(this._withArgsInternal(args), this._client); } /** @internal */ @@ -19716,12 +19912,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new ProjectResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -19733,11 +19930,11 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ProjectResourcePromise { + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new ProjectResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new ProjectResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -19752,12 +19949,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withReferenceUriInternal(name, uri)); + return new ProjectResourcePromiseImpl(this._withReferenceUriInternal(name, uri), this._client); } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource): Promise { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -19766,13 +19964,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService)); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -19781,8 +19980,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference)); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -19813,7 +20012,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp const isProxied = options?.isProxied; const isExternal = options?.isExternal; const protocol = options?.protocol; - return new ProjectResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol)); + return new ProjectResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } /** @internal */ @@ -19838,7 +20037,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new ProjectResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied)); + return new ProjectResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -19863,7 +20062,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new ProjectResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied)); + return new ProjectResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -19878,7 +20077,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withExternalHttpEndpointsInternal()); + return new ProjectResourcePromiseImpl(this._withExternalHttpEndpointsInternal(), this._client); } /** Gets an endpoint reference */ @@ -19902,7 +20101,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures resource for HTTP/2 */ asHttp2Service(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._asHttp2ServiceInternal()); + return new ProjectResourcePromiseImpl(this._asHttp2ServiceInternal(), this._client); } /** @internal */ @@ -19922,7 +20121,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ProjectResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -19939,12 +20138,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ProjectResourcePromise { const displayText = options?.displayText; - return new ProjectResourcePromiseImpl(this._withUrlInternal(url, displayText)); + return new ProjectResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -19956,7 +20156,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise { const displayText = options?.displayText; - return new ProjectResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText)); + return new ProjectResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } /** @internal */ @@ -19975,7 +20175,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ProjectResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -19995,12 +20195,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new ProjectResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ - private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles, destinationPath: string): Promise { - const rpcArgs: Record = { builder: this._handle, source, destinationPath }; + private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved, destinationPath }; const result = await this._client.invokeCapability( 'Aspire.Hosting/publishWithContainerFilesFromResource', rpcArgs @@ -20009,8 +20210,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath)); + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath), this._client); } /** @internal */ @@ -20025,12 +20226,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._excludeFromManifestInternal()); + return new ProjectResourcePromiseImpl(this._excludeFromManifestInternal(), this._client); } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -20039,13 +20241,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._waitForInternal(dependency)); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -20054,13 +20257,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior)); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -20069,13 +20273,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._waitForStartInternal(dependency)); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -20084,8 +20289,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior)); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -20100,12 +20305,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Prevents resource from starting automatically */ withExplicitStart(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withExplicitStartInternal()); + return new ProjectResourcePromiseImpl(this._withExplicitStartInternal(), this._client); } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, exitCode?: number): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -20115,9 +20321,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ProjectResourcePromise { + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise { const exitCode = options?.exitCode; - return new ProjectResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new ProjectResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -20132,7 +20338,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a health check by key */ withHealthCheck(key: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withHealthCheckInternal(key)); + return new ProjectResourcePromiseImpl(this._withHealthCheckInternal(key), this._client); } /** @internal */ @@ -20153,7 +20359,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp const path = options?.path; const statusCode = options?.statusCode; const endpointName = options?.endpointName; - return new ProjectResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName)); + return new ProjectResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } /** @internal */ @@ -20175,7 +20381,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise { const commandOptions = options?.commandOptions; - return new ProjectResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ProjectResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -20190,7 +20396,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust)); + return new ProjectResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust), this._client); } /** @internal */ @@ -20205,13 +20411,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope)); + return new ProjectResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope), this._client); } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -20222,7 +20429,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ProjectResourcePromise { const password = options?.password; - return new ProjectResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password)); + return new ProjectResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } /** @internal */ @@ -20237,12 +20444,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withoutHttpsCertificateInternal()); + return new ProjectResourcePromiseImpl(this._withoutHttpsCertificateInternal(), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -20251,13 +20459,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withParentRelationshipInternal(parent)); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -20266,8 +20475,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withChildRelationshipInternal(child)); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -20284,7 +20493,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise { const iconVariant = options?.iconVariant; - return new ProjectResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant)); + return new ProjectResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } /** @internal */ @@ -20313,7 +20522,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp const failureThreshold = options?.failureThreshold; const successThreshold = options?.successThreshold; const endpointName = options?.endpointName; - return new ProjectResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName)); + return new ProjectResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } /** @internal */ @@ -20328,7 +20537,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._excludeFromMcpInternal()); + return new ProjectResourcePromiseImpl(this._excludeFromMcpInternal(), this._client); } /** @internal */ @@ -20343,7 +20552,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName)); + return new ProjectResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName), this._client); } /** @internal */ @@ -20358,7 +20567,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag)); + return new ProjectResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag), this._client); } /** @internal */ @@ -20386,7 +20595,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp const requiredBy = options?.requiredBy; const tags = options?.tags; const description = options?.description; - return new ProjectResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description)); + return new ProjectResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } /** @internal */ @@ -20406,7 +20615,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ProjectResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -20435,7 +20644,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ProjectResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -20455,7 +20664,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ProjectResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -20475,7 +20684,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ProjectResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -20495,7 +20704,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new ProjectResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -20515,7 +20724,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ProjectResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -20534,7 +20743,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp withOptionalString(options?: WithOptionalStringOptions): ProjectResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new ProjectResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new ProjectResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -20549,7 +20758,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withConfigInternal(config)); + return new ProjectResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -20569,7 +20778,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new ProjectResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -20584,7 +20793,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the created timestamp */ withCreatedAt(createdAt: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new ProjectResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -20599,7 +20808,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new ProjectResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -20614,7 +20823,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the correlation ID */ withCorrelationId(correlationId: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new ProjectResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -20636,7 +20845,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ProjectResourcePromise { const callback = options?.callback; - return new ProjectResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new ProjectResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -20651,7 +20860,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the resource status */ withStatus(status: TestResourceStatus): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withStatusInternal(status)); + return new ProjectResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -20666,7 +20875,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new ProjectResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -20686,12 +20895,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ProjectResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -20700,13 +20910,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -20715,13 +20926,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -20730,8 +20942,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -20746,7 +20958,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the endpoints */ withEndpoints(endpoints: string[]): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new ProjectResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -20761,7 +20973,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets environment variables */ withEnvironmentVariables(variables: Record): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new ProjectResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -20780,7 +20992,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ProjectResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -20795,7 +21007,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a label to the resource */ withMergeLabel(label: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new ProjectResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -20810,7 +21022,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new ProjectResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -20825,7 +21037,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new ProjectResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -20840,7 +21052,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new ProjectResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -20859,7 +21071,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ProjectResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ProjectResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new ProjectResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -20878,7 +21090,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ProjectResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ProjectResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new ProjectResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -20893,7 +21105,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new ProjectResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -20908,7 +21120,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new ProjectResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -20919,7 +21131,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * await builder.addSomething().withX().withY(); */ class ProjectResourcePromiseImpl implements ProjectResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ProjectResource) => TResult1 | PromiseLike) | null, @@ -20929,53 +21143,53 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Sets the number of replicas */ withReplicas(replicas: number): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReplicas(replicas))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReplicas(replicas)), this._client); } /** Disables forwarded headers for the project */ disableForwardedHeaders(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.disableForwardedHeaders())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.disableForwardedHeaders()), this._client); } /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.publishAsDockerFile(options)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -20983,86 +21197,86 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds arguments */ withArgs(args: string[]): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -21072,152 +21286,152 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath))); + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -21227,147 +21441,147 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ProjectResourcePromise { - return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -21378,7 +21592,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { export interface TestDatabaseResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestDatabaseResourcePromise; withEntrypoint(entrypoint: string): TestDatabaseResourcePromise; withImageTag(tag: string): TestDatabaseResourcePromise; @@ -21391,8 +21605,8 @@ export interface TestDatabaseResource { publishAsContainer(): TestDatabaseResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestDatabaseResourcePromise; withContainerName(name: string): TestDatabaseResourcePromise; - withBuildArg(name: string, value: ParameterResource): TestDatabaseResourcePromise; - withBuildSecret(name: string, value: ParameterResource): TestDatabaseResourcePromise; + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestDatabaseResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestDatabaseResourcePromise; withContainerNetworkAlias(alias: string): TestDatabaseResourcePromise; @@ -21401,18 +21615,18 @@ export interface TestDatabaseResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestDatabaseResourcePromise; publishAsConnectionString(): TestDatabaseResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestDatabaseResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestDatabaseResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestDatabaseResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestDatabaseResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestDatabaseResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): TestDatabaseResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestDatabaseResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; withArgs(args: string[]): TestDatabaseResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestDatabaseResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestDatabaseResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestDatabaseResourcePromise; withReferenceUri(name: string, uri: string): TestDatabaseResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): TestDatabaseResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): TestDatabaseResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestDatabaseResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; withEndpoint(options?: WithEndpointOptions): TestDatabaseResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestDatabaseResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestDatabaseResourcePromise; @@ -21425,12 +21639,12 @@ export interface TestDatabaseResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestDatabaseResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestDatabaseResourcePromise; excludeFromManifest(): TestDatabaseResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; withExplicitStart(): TestDatabaseResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; withHealthCheck(key: string): TestDatabaseResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestDatabaseResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestDatabaseResourcePromise; @@ -21438,8 +21652,8 @@ export interface TestDatabaseResource { withCertificateTrustScope(scope: CertificateTrustScope): TestDatabaseResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestDatabaseResourcePromise; withoutHttpsCertificate(): TestDatabaseResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestDatabaseResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestDatabaseResourcePromise; excludeFromMcp(): TestDatabaseResourcePromise; @@ -21464,9 +21678,9 @@ export interface TestDatabaseResource { withStatus(status: TestResourceStatus): TestDatabaseResourcePromise; withNestedConfig(config: TestNestedDto): TestDatabaseResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -21481,7 +21695,7 @@ export interface TestDatabaseResource { } export interface TestDatabaseResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestDatabaseResourcePromise; withEntrypoint(entrypoint: string): TestDatabaseResourcePromise; withImageTag(tag: string): TestDatabaseResourcePromise; @@ -21494,8 +21708,8 @@ export interface TestDatabaseResourcePromise extends PromiseLike): TestDatabaseResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestDatabaseResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestDatabaseResourcePromise; withContainerNetworkAlias(alias: string): TestDatabaseResourcePromise; @@ -21504,18 +21718,18 @@ export interface TestDatabaseResourcePromise extends PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestDatabaseResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestDatabaseResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestDatabaseResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): TestDatabaseResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestDatabaseResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; withArgs(args: string[]): TestDatabaseResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestDatabaseResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestDatabaseResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestDatabaseResourcePromise; withReferenceUri(name: string, uri: string): TestDatabaseResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): TestDatabaseResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): TestDatabaseResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestDatabaseResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; withEndpoint(options?: WithEndpointOptions): TestDatabaseResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestDatabaseResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestDatabaseResourcePromise; @@ -21528,12 +21742,12 @@ export interface TestDatabaseResourcePromise extends PromiseLike Promise): TestDatabaseResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestDatabaseResourcePromise; excludeFromManifest(): TestDatabaseResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; withExplicitStart(): TestDatabaseResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; withHealthCheck(key: string): TestDatabaseResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestDatabaseResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestDatabaseResourcePromise; @@ -21541,8 +21755,8 @@ export interface TestDatabaseResourcePromise extends PromiseLike): TestDatabaseResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestDatabaseResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestDatabaseResourcePromise; excludeFromMcp(): TestDatabaseResourcePromise; @@ -21567,9 +21781,9 @@ export interface TestDatabaseResourcePromise extends PromiseLike Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -21593,8 +21807,9 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -21603,8 +21818,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -21621,7 +21836,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -21806,13 +22022,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -21821,8 +22038,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } /** @internal */ @@ -21837,7 +22054,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -21966,13 +22184,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -21985,7 +22204,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -22022,13 +22242,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -22040,13 +22261,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -22058,8 +22280,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ @@ -22074,7 +22296,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -22111,11 +22334,11 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): TestDatabaseResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new TestDatabaseResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new TestDatabaseResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -22130,12 +22353,13 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -22144,13 +22368,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -22159,8 +22384,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -22191,7 +22416,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -22317,12 +22542,13 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -22334,7 +22560,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new TestDatabaseResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -22373,7 +22599,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new TestDatabaseResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ @@ -22388,12 +22614,13 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -22402,13 +22629,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -22417,13 +22645,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -22432,13 +22661,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -22447,8 +22677,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -22463,12 +22693,13 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -22478,9 +22709,9 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { const exitCode = options?.exitCode; - return new TestDatabaseResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new TestDatabaseResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -22495,7 +22726,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): TestDatabaseResourcePromise { const commandOptions = options?.commandOptions; - return new TestDatabaseResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new TestDatabaseResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -22553,7 +22784,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -22585,7 +22817,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -22614,13 +22847,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -22629,8 +22863,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -22647,7 +22881,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** @internal */ @@ -22788,7 +23022,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -22837,7 +23071,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -22857,7 +23091,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -22877,7 +23111,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -22897,7 +23131,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -22916,7 +23150,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new TestDatabaseResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -22966,7 +23200,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withValidatorInternal(validator)); + return new TestDatabaseResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -23082,13 +23317,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -23097,13 +23333,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -23112,8 +23349,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -23128,7 +23365,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new TestDatabaseResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -23162,7 +23399,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new TestDatabaseResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -23177,7 +23414,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestDatabaseResource) => TResult1 | PromiseLike) | null, @@ -23311,123 +23550,123 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options)), this._client); } /** Sets the container entrypoint */ withEntrypoint(entrypoint: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint)), this._client); } /** Sets the container image tag */ withImageTag(tag: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag)), this._client); } /** Sets the container image registry */ withImageRegistry(registry: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry)), this._client); } /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options)), this._client); } /** Sets the image SHA256 digest */ withImageSHA256(sha256: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256)), this._client); } /** Adds runtime arguments for the container */ withContainerRuntimeArgs(args: string[]): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args)), this._client); } /** Sets the lifetime behavior of the container resource */ withLifetime(lifetime: ContainerLifetime): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime)), this._client); } /** Sets the container image pull policy */ withImagePullPolicy(pullPolicy: ImagePullPolicy): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy)), this._client); } /** Configures the resource to be published as a container */ publishAsContainer(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer()), this._client); } /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options)), this._client); } /** Sets the container name */ withContainerName(name: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name)), this._client); } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value))); + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value))); + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } /** Configures endpoint proxy support */ withEndpointProxySupport(proxyEnabled: boolean): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds a network alias for the container */ withContainerNetworkAlias(alias: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Publishes the resource as a connection string */ publishAsConnectionString(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString()), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -23435,86 +23674,86 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds arguments */ withArgs(args: string[]): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -23524,152 +23763,152 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options)), this._client); } /** Gets the resource name */ @@ -23679,147 +23918,147 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -23830,7 +24069,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { export interface TestRedisResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise; withEntrypoint(entrypoint: string): TestRedisResourcePromise; withImageTag(tag: string): TestRedisResourcePromise; @@ -23843,8 +24082,8 @@ export interface TestRedisResource { publishAsContainer(): TestRedisResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise; withContainerName(name: string): TestRedisResourcePromise; - withBuildArg(name: string, value: ParameterResource): TestRedisResourcePromise; - withBuildSecret(name: string, value: ParameterResource): TestRedisResourcePromise; + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestRedisResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise; withContainerNetworkAlias(alias: string): TestRedisResourcePromise; @@ -23853,21 +24092,21 @@ export interface TestRedisResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise; publishAsConnectionString(): TestRedisResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestRedisResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestRedisResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): TestRedisResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): TestRedisResourcePromise; withConnectionPropertyValue(name: string, value: string): TestRedisResourcePromise; withArgs(args: string[]): TestRedisResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestRedisResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestRedisResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise; getConnectionProperty(key: string): Promise; withReferenceUri(name: string, uri: string): TestRedisResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): TestRedisResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): TestRedisResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; withEndpoint(options?: WithEndpointOptions): TestRedisResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestRedisResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestRedisResourcePromise; @@ -23880,12 +24119,12 @@ export interface TestRedisResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestRedisResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestRedisResourcePromise; excludeFromManifest(): TestRedisResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; withExplicitStart(): TestRedisResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestRedisResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise; withHealthCheck(key: string): TestRedisResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestRedisResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise; @@ -23893,8 +24132,8 @@ export interface TestRedisResource { withCertificateTrustScope(scope: CertificateTrustScope): TestRedisResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestRedisResourcePromise; withoutHttpsCertificate(): TestRedisResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestRedisResourcePromise; excludeFromMcp(): TestRedisResourcePromise; @@ -23925,12 +24164,12 @@ export interface TestRedisResource { withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -23949,7 +24188,7 @@ export interface TestRedisResource { } export interface TestRedisResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise; withEntrypoint(entrypoint: string): TestRedisResourcePromise; withImageTag(tag: string): TestRedisResourcePromise; @@ -23962,8 +24201,8 @@ export interface TestRedisResourcePromise extends PromiseLike publishAsContainer(): TestRedisResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise; withContainerName(name: string): TestRedisResourcePromise; - withBuildArg(name: string, value: ParameterResource): TestRedisResourcePromise; - withBuildSecret(name: string, value: ParameterResource): TestRedisResourcePromise; + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestRedisResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise; withContainerNetworkAlias(alias: string): TestRedisResourcePromise; @@ -23972,21 +24211,21 @@ export interface TestRedisResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise; publishAsConnectionString(): TestRedisResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestRedisResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestRedisResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): TestRedisResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): TestRedisResourcePromise; withConnectionPropertyValue(name: string, value: string): TestRedisResourcePromise; withArgs(args: string[]): TestRedisResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestRedisResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestRedisResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise; getConnectionProperty(key: string): Promise; withReferenceUri(name: string, uri: string): TestRedisResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): TestRedisResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): TestRedisResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; withEndpoint(options?: WithEndpointOptions): TestRedisResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestRedisResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestRedisResourcePromise; @@ -23999,12 +24238,12 @@ export interface TestRedisResourcePromise extends PromiseLike withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestRedisResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestRedisResourcePromise; excludeFromManifest(): TestRedisResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; withExplicitStart(): TestRedisResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestRedisResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise; withHealthCheck(key: string): TestRedisResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestRedisResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise; @@ -24012,8 +24251,8 @@ export interface TestRedisResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): TestRedisResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestRedisResourcePromise; withoutHttpsCertificate(): TestRedisResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestRedisResourcePromise; excludeFromMcp(): TestRedisResourcePromise; @@ -24044,12 +24283,12 @@ export interface TestRedisResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -24077,8 +24316,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -24087,8 +24327,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withContainerRegistryInternal(registry)); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -24105,7 +24345,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise { const isReadOnly = options?.isReadOnly; - return new TestRedisResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly)); + return new TestRedisResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } /** @internal */ @@ -24120,7 +24360,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container entrypoint */ withEntrypoint(entrypoint: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEntrypointInternal(entrypoint)); + return new TestRedisResourcePromiseImpl(this._withEntrypointInternal(entrypoint), this._client); } /** @internal */ @@ -24135,7 +24375,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container image tag */ withImageTag(tag: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withImageTagInternal(tag)); + return new TestRedisResourcePromiseImpl(this._withImageTagInternal(tag), this._client); } /** @internal */ @@ -24150,7 +24390,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container image registry */ withImageRegistry(registry: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withImageRegistryInternal(registry)); + return new TestRedisResourcePromiseImpl(this._withImageRegistryInternal(registry), this._client); } /** @internal */ @@ -24167,7 +24407,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestRedisResourcePromise { const tag = options?.tag; - return new TestRedisResourcePromiseImpl(this._withImageInternal(image, tag)); + return new TestRedisResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } /** @internal */ @@ -24182,7 +24422,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the image SHA256 digest */ withImageSHA256(sha256: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withImageSHA256Internal(sha256)); + return new TestRedisResourcePromiseImpl(this._withImageSHA256Internal(sha256), this._client); } /** @internal */ @@ -24197,7 +24437,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds runtime arguments for the container */ withContainerRuntimeArgs(args: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withContainerRuntimeArgsInternal(args)); + return new TestRedisResourcePromiseImpl(this._withContainerRuntimeArgsInternal(args), this._client); } /** @internal */ @@ -24212,7 +24452,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the lifetime behavior of the container resource */ withLifetime(lifetime: ContainerLifetime): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withLifetimeInternal(lifetime)); + return new TestRedisResourcePromiseImpl(this._withLifetimeInternal(lifetime), this._client); } /** @internal */ @@ -24227,7 +24467,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container image pull policy */ withImagePullPolicy(pullPolicy: ImagePullPolicy): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withImagePullPolicyInternal(pullPolicy)); + return new TestRedisResourcePromiseImpl(this._withImagePullPolicyInternal(pullPolicy), this._client); } /** @internal */ @@ -24242,7 +24482,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the resource to be published as a container */ publishAsContainer(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._publishAsContainerInternal()); + return new TestRedisResourcePromiseImpl(this._publishAsContainerInternal(), this._client); } /** @internal */ @@ -24261,7 +24501,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise { const dockerfilePath = options?.dockerfilePath; const stage = options?.stage; - return new TestRedisResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage)); + return new TestRedisResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } /** @internal */ @@ -24276,12 +24516,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container name */ withContainerName(name: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withContainerNameInternal(name)); + return new TestRedisResourcePromiseImpl(this._withContainerNameInternal(name), this._client); } /** @internal */ - private async _withBuildArgInternal(name: string, value: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -24290,13 +24531,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withBuildArgInternal(name, value)); + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -24305,8 +24547,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withBuildSecretInternal(name, value)); + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } /** @internal */ @@ -24321,7 +24563,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures endpoint proxy support */ withEndpointProxySupport(proxyEnabled: boolean): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEndpointProxySupportInternal(proxyEnabled)); + return new TestRedisResourcePromiseImpl(this._withEndpointProxySupportInternal(proxyEnabled), this._client); } /** @internal */ @@ -24340,7 +24582,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise { const buildImage = options?.buildImage; const runtimeImage = options?.runtimeImage; - return new TestRedisResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage)); + return new TestRedisResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } /** @internal */ @@ -24355,7 +24597,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a network alias for the container */ withContainerNetworkAlias(alias: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withContainerNetworkAliasInternal(alias)); + return new TestRedisResourcePromiseImpl(this._withContainerNetworkAliasInternal(alias), this._client); } /** @internal */ @@ -24374,7 +24616,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withMcpServer(options?: WithMcpServerOptions): TestRedisResourcePromise { const path = options?.path; const endpointName = options?.endpointName; - return new TestRedisResourcePromiseImpl(this._withMcpServerInternal(path, endpointName)); + return new TestRedisResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } /** @internal */ @@ -24389,7 +24631,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export */ withOtlpExporter(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withOtlpExporterInternal()); + return new TestRedisResourcePromiseImpl(this._withOtlpExporterInternal(), this._client); } /** @internal */ @@ -24404,7 +24646,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol)); + return new TestRedisResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol), this._client); } /** @internal */ @@ -24419,7 +24661,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Publishes the resource as a connection string */ publishAsConnectionString(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._publishAsConnectionStringInternal()); + return new TestRedisResourcePromiseImpl(this._publishAsConnectionStringInternal(), this._client); } /** @internal */ @@ -24436,12 +24678,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise { const helpLink = options?.helpLink; - return new TestRedisResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink)); + return new TestRedisResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -24450,13 +24693,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentInternal(name, value)); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -24469,7 +24713,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value)); + return new TestRedisResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value), this._client); } /** @internal */ @@ -24489,12 +24733,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -24506,13 +24751,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference)); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -24524,13 +24770,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter)); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -24542,13 +24789,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource)); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ private async _withConnectionPropertyInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', rpcArgs @@ -24558,7 +24806,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a connection property with a reference expression */ withConnectionProperty(name: string, value: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConnectionPropertyInternal(name, value)); + return new TestRedisResourcePromiseImpl(this._withConnectionPropertyInternal(name, value), this._client); } /** @internal */ @@ -24573,7 +24821,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a connection property with a string value */ withConnectionPropertyValue(name: string, value: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConnectionPropertyValueInternal(name, value)); + return new TestRedisResourcePromiseImpl(this._withConnectionPropertyValueInternal(name, value), this._client); } /** @internal */ @@ -24588,7 +24836,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds arguments */ withArgs(args: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withArgsInternal(args)); + return new TestRedisResourcePromiseImpl(this._withArgsInternal(args), this._client); } /** @internal */ @@ -24608,12 +24856,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -24625,11 +24874,11 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestRedisResourcePromise { + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new TestRedisResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new TestRedisResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** Gets a connection property by key */ @@ -24653,12 +24902,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withReferenceUriInternal(name, uri)); + return new TestRedisResourcePromiseImpl(this._withReferenceUriInternal(name, uri), this._client); } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource): Promise { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -24667,13 +24917,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService)); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -24682,8 +24933,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference)); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -24714,7 +24965,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase const isProxied = options?.isProxied; const isExternal = options?.isExternal; const protocol = options?.protocol; - return new TestRedisResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol)); + return new TestRedisResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } /** @internal */ @@ -24739,7 +24990,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new TestRedisResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied)); + return new TestRedisResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -24764,7 +25015,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new TestRedisResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied)); + return new TestRedisResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -24779,7 +25030,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withExternalHttpEndpointsInternal()); + return new TestRedisResourcePromiseImpl(this._withExternalHttpEndpointsInternal(), this._client); } /** Gets an endpoint reference */ @@ -24803,7 +25054,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource for HTTP/2 */ asHttp2Service(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._asHttp2ServiceInternal()); + return new TestRedisResourcePromiseImpl(this._asHttp2ServiceInternal(), this._client); } /** @internal */ @@ -24823,7 +25074,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -24840,12 +25091,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestRedisResourcePromise { const displayText = options?.displayText; - return new TestRedisResourcePromiseImpl(this._withUrlInternal(url, displayText)); + return new TestRedisResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -24857,7 +25109,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestRedisResourcePromise { const displayText = options?.displayText; - return new TestRedisResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText)); + return new TestRedisResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } /** @internal */ @@ -24876,7 +25128,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new TestRedisResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -24896,7 +25148,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new TestRedisResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ @@ -24911,12 +25163,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Excludes the resource from the deployment manifest */ excludeFromManifest(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._excludeFromManifestInternal()); + return new TestRedisResourcePromiseImpl(this._excludeFromManifestInternal(), this._client); } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -24925,13 +25178,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._waitForInternal(dependency)); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -24940,13 +25194,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior)); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -24955,13 +25210,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._waitForStartInternal(dependency)); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -24970,8 +25226,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior)); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -24986,12 +25242,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Prevents resource from starting automatically */ withExplicitStart(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withExplicitStartInternal()); + return new TestRedisResourcePromiseImpl(this._withExplicitStartInternal(), this._client); } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, exitCode?: number): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -25001,9 +25258,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestRedisResourcePromise { + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise { const exitCode = options?.exitCode; - return new TestRedisResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new TestRedisResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -25018,7 +25275,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a health check by key */ withHealthCheck(key: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withHealthCheckInternal(key)); + return new TestRedisResourcePromiseImpl(this._withHealthCheckInternal(key), this._client); } /** @internal */ @@ -25039,7 +25296,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase const path = options?.path; const statusCode = options?.statusCode; const endpointName = options?.endpointName; - return new TestRedisResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName)); + return new TestRedisResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } /** @internal */ @@ -25061,7 +25318,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise { const commandOptions = options?.commandOptions; - return new TestRedisResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new TestRedisResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -25076,7 +25333,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust)); + return new TestRedisResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust), this._client); } /** @internal */ @@ -25091,13 +25348,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope)); + return new TestRedisResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope), this._client); } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -25108,7 +25366,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestRedisResourcePromise { const password = options?.password; - return new TestRedisResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password)); + return new TestRedisResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } /** @internal */ @@ -25123,12 +25381,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withoutHttpsCertificateInternal()); + return new TestRedisResourcePromiseImpl(this._withoutHttpsCertificateInternal(), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -25137,13 +25396,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withParentRelationshipInternal(parent)); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -25152,8 +25412,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withChildRelationshipInternal(child)); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -25170,7 +25430,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise { const iconVariant = options?.iconVariant; - return new TestRedisResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant)); + return new TestRedisResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } /** @internal */ @@ -25199,7 +25459,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase const failureThreshold = options?.failureThreshold; const successThreshold = options?.successThreshold; const endpointName = options?.endpointName; - return new TestRedisResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName)); + return new TestRedisResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } /** @internal */ @@ -25214,7 +25474,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Excludes the resource from MCP server exposure */ excludeFromMcp(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._excludeFromMcpInternal()); + return new TestRedisResourcePromiseImpl(this._excludeFromMcpInternal(), this._client); } /** @internal */ @@ -25229,7 +25489,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName)); + return new TestRedisResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName), this._client); } /** @internal */ @@ -25244,7 +25504,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag)); + return new TestRedisResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag), this._client); } /** @internal */ @@ -25272,7 +25532,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase const requiredBy = options?.requiredBy; const tags = options?.tags; const description = options?.description; - return new TestRedisResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description)); + return new TestRedisResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } /** @internal */ @@ -25292,7 +25552,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** @internal */ @@ -25311,7 +25571,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withVolume(target: string, options?: WithVolumeOptions): TestRedisResourcePromise { const name = options?.name; const isReadOnly = options?.isReadOnly; - return new TestRedisResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly)); + return new TestRedisResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } /** Gets the resource name */ @@ -25340,7 +25600,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new TestRedisResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -25360,7 +25620,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new TestRedisResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -25380,7 +25640,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Subscribes to the ConnectionStringAvailable event */ onConnectionStringAvailable(callback: (arg: ConnectionStringAvailableEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._onConnectionStringAvailableInternal(callback)); + return new TestRedisResourcePromiseImpl(this._onConnectionStringAvailableInternal(callback), this._client); } /** @internal */ @@ -25400,7 +25660,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new TestRedisResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -25420,7 +25680,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new TestRedisResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -25440,7 +25700,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new TestRedisResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -25457,7 +25717,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { const databaseName = options?.databaseName; - return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName)); + return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName), this._client); } /** @internal */ @@ -25474,7 +25734,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { const mode = options?.mode; - return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode)); + return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode), this._client); } /** @internal */ @@ -25493,7 +25753,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -25508,7 +25768,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConfigInternal(config)); + return new TestRedisResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** Gets the tags for the resource */ @@ -25531,7 +25791,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionStringInternal(connectionString: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, connectionString }; + const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -25541,7 +25802,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the connection string using a reference expression */ withConnectionString(connectionString: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConnectionStringInternal(connectionString)); + return new TestRedisResourcePromiseImpl(this._withConnectionStringInternal(connectionString), this._client); } /** @internal */ @@ -25561,7 +25822,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -25576,7 +25837,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new TestRedisResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -25591,7 +25852,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new TestRedisResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -25606,7 +25867,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new TestRedisResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -25628,7 +25889,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { const callback = options?.callback; - return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -25643,7 +25904,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the resource status */ withStatus(status: TestResourceStatus): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withStatusInternal(status)); + return new TestRedisResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -25658,7 +25919,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new TestRedisResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -25678,12 +25939,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withValidatorInternal(validator)); + return new TestRedisResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -25692,8 +25954,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** Gets the endpoints */ @@ -25717,7 +25979,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets connection string using direct interface target */ withConnectionStringDirect(connectionString: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withConnectionStringDirectInternal(connectionString)); + return new TestRedisResourcePromiseImpl(this._withConnectionStringDirectInternal(connectionString), this._client); } /** @internal */ @@ -25732,12 +25994,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Redis-specific configuration */ withRedisSpecific(option: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withRedisSpecificInternal(option)); + return new TestRedisResourcePromiseImpl(this._withRedisSpecificInternal(option), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -25746,13 +26009,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -25761,8 +26025,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -25777,7 +26041,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new TestRedisResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -25792,7 +26056,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new TestRedisResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** Gets the status of the resource asynchronously */ @@ -25822,7 +26086,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new TestRedisResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** Waits for the resource to be ready */ @@ -25855,7 +26119,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Tests multi-param callback destructuring */ withMultiParamHandleCallback(callback: (arg1: TestCallbackContext, arg2: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMultiParamHandleCallbackInternal(callback)); + return new TestRedisResourcePromiseImpl(this._withMultiParamHandleCallbackInternal(callback), this._client); } /** @internal */ @@ -25874,7 +26138,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { const name = options?.name; const isReadOnly = options?.isReadOnly; - return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly)); + return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly), this._client); } /** @internal */ @@ -25889,7 +26153,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a label to the resource */ withMergeLabel(label: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new TestRedisResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -25904,7 +26168,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new TestRedisResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -25919,7 +26183,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new TestRedisResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -25934,7 +26198,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new TestRedisResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -25953,7 +26217,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -25972,7 +26236,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -25987,7 +26251,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new TestRedisResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -26002,7 +26266,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new TestRedisResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -26013,7 +26277,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestRedisResource) => TResult1 | PromiseLike) | null, @@ -26023,123 +26289,123 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options)), this._client); } /** Sets the container entrypoint */ withEntrypoint(entrypoint: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint)), this._client); } /** Sets the container image tag */ withImageTag(tag: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag)), this._client); } /** Sets the container image registry */ withImageRegistry(registry: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry)), this._client); } /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options)), this._client); } /** Sets the image SHA256 digest */ withImageSHA256(sha256: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256)), this._client); } /** Adds runtime arguments for the container */ withContainerRuntimeArgs(args: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args)), this._client); } /** Sets the lifetime behavior of the container resource */ withLifetime(lifetime: ContainerLifetime): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime)), this._client); } /** Sets the container image pull policy */ withImagePullPolicy(pullPolicy: ImagePullPolicy): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy)), this._client); } /** Configures the resource to be published as a container */ publishAsContainer(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer()), this._client); } /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options)), this._client); } /** Sets the container name */ withContainerName(name: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name)), this._client); } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value))); + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value))); + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } /** Configures endpoint proxy support */ withEndpointProxySupport(proxyEnabled: boolean): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds a network alias for the container */ withContainerNetworkAlias(alias: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Publishes the resource as a connection string */ publishAsConnectionString(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString()), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -26147,61 +26413,61 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds a connection property with a reference expression */ withConnectionProperty(name: string, value: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionProperty(name, value))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionProperty(name, value)), this._client); } /** Adds a connection property with a string value */ withConnectionPropertyValue(name: string, value: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionPropertyValue(name, value))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionPropertyValue(name, value)), this._client); } /** Adds arguments */ withArgs(args: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Gets a connection property by key */ @@ -26211,37 +26477,37 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -26251,152 +26517,152 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options)), this._client); } /** Gets the resource name */ @@ -26406,52 +26672,52 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the ConnectionStringAvailable event */ onConnectionStringAvailable(callback: (arg: ConnectionStringAvailableEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onConnectionStringAvailable(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onConnectionStringAvailable(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { - return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.addTestChildDatabase(name, options))); + return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.addTestChildDatabase(name, options)), this._client); } /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPersistence(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withPersistence(options)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Gets the tags for the resource */ @@ -26466,52 +26732,52 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Sets the connection string using a reference expression */ withConnectionString(connectionString: ReferenceExpression): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Gets the endpoints */ @@ -26521,32 +26787,32 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Sets connection string using direct interface target */ withConnectionStringDirect(connectionString: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString)), this._client); } /** Redis-specific configuration */ withRedisSpecific(option: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRedisSpecific(option))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withRedisSpecific(option)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Gets the status of the resource asynchronously */ @@ -26556,7 +26822,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Waits for the resource to be ready */ @@ -26566,52 +26832,52 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { /** Tests multi-param callback destructuring */ withMultiParamHandleCallback(callback: (arg1: TestCallbackContext, arg2: TestEnvironmentContext) => Promise): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMultiParamHandleCallback(callback))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMultiParamHandleCallback(callback)), this._client); } /** Adds a data volume with persistence */ withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDataVolume(options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDataVolume(options)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestRedisResourcePromise { - return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -26622,7 +26888,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { export interface TestVaultResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise; withEntrypoint(entrypoint: string): TestVaultResourcePromise; withImageTag(tag: string): TestVaultResourcePromise; @@ -26635,8 +26901,8 @@ export interface TestVaultResource { publishAsContainer(): TestVaultResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise; withContainerName(name: string): TestVaultResourcePromise; - withBuildArg(name: string, value: ParameterResource): TestVaultResourcePromise; - withBuildSecret(name: string, value: ParameterResource): TestVaultResourcePromise; + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestVaultResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise; withContainerNetworkAlias(alias: string): TestVaultResourcePromise; @@ -26645,18 +26911,18 @@ export interface TestVaultResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise; publishAsConnectionString(): TestVaultResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestVaultResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestVaultResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): TestVaultResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; withArgs(args: string[]): TestVaultResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestVaultResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestVaultResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise; withReferenceUri(name: string, uri: string): TestVaultResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): TestVaultResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): TestVaultResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; withEndpoint(options?: WithEndpointOptions): TestVaultResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestVaultResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestVaultResourcePromise; @@ -26669,12 +26935,12 @@ export interface TestVaultResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestVaultResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestVaultResourcePromise; excludeFromManifest(): TestVaultResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; withExplicitStart(): TestVaultResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestVaultResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise; withHealthCheck(key: string): TestVaultResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestVaultResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise; @@ -26682,8 +26948,8 @@ export interface TestVaultResource { withCertificateTrustScope(scope: CertificateTrustScope): TestVaultResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestVaultResourcePromise; withoutHttpsCertificate(): TestVaultResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestVaultResourcePromise; excludeFromMcp(): TestVaultResourcePromise; @@ -26708,9 +26974,9 @@ export interface TestVaultResource { withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -26726,7 +26992,7 @@ export interface TestVaultResource { } export interface TestVaultResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise; withEntrypoint(entrypoint: string): TestVaultResourcePromise; withImageTag(tag: string): TestVaultResourcePromise; @@ -26739,8 +27005,8 @@ export interface TestVaultResourcePromise extends PromiseLike publishAsContainer(): TestVaultResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise; withContainerName(name: string): TestVaultResourcePromise; - withBuildArg(name: string, value: ParameterResource): TestVaultResourcePromise; - withBuildSecret(name: string, value: ParameterResource): TestVaultResourcePromise; + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestVaultResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise; withContainerNetworkAlias(alias: string): TestVaultResourcePromise; @@ -26749,18 +27015,18 @@ export interface TestVaultResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise; publishAsConnectionString(): TestVaultResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestVaultResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestVaultResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): TestVaultResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; withArgs(args: string[]): TestVaultResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestVaultResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestVaultResourcePromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise; withReferenceUri(name: string, uri: string): TestVaultResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource): TestVaultResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference): TestVaultResourcePromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; withEndpoint(options?: WithEndpointOptions): TestVaultResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestVaultResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestVaultResourcePromise; @@ -26773,12 +27039,12 @@ export interface TestVaultResourcePromise extends PromiseLike withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestVaultResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestVaultResourcePromise; excludeFromManifest(): TestVaultResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; withExplicitStart(): TestVaultResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestVaultResourcePromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise; withHealthCheck(key: string): TestVaultResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestVaultResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise; @@ -26786,8 +27052,8 @@ export interface TestVaultResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): TestVaultResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestVaultResourcePromise; withoutHttpsCertificate(): TestVaultResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestVaultResourcePromise; excludeFromMcp(): TestVaultResourcePromise; @@ -26812,9 +27078,9 @@ export interface TestVaultResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -26839,8 +27105,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -26849,8 +27116,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withContainerRegistryInternal(registry)); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -26867,7 +27134,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise { const isReadOnly = options?.isReadOnly; - return new TestVaultResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly)); + return new TestVaultResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } /** @internal */ @@ -26882,7 +27149,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container entrypoint */ withEntrypoint(entrypoint: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEntrypointInternal(entrypoint)); + return new TestVaultResourcePromiseImpl(this._withEntrypointInternal(entrypoint), this._client); } /** @internal */ @@ -26897,7 +27164,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container image tag */ withImageTag(tag: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withImageTagInternal(tag)); + return new TestVaultResourcePromiseImpl(this._withImageTagInternal(tag), this._client); } /** @internal */ @@ -26912,7 +27179,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container image registry */ withImageRegistry(registry: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withImageRegistryInternal(registry)); + return new TestVaultResourcePromiseImpl(this._withImageRegistryInternal(registry), this._client); } /** @internal */ @@ -26929,7 +27196,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestVaultResourcePromise { const tag = options?.tag; - return new TestVaultResourcePromiseImpl(this._withImageInternal(image, tag)); + return new TestVaultResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } /** @internal */ @@ -26944,7 +27211,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the image SHA256 digest */ withImageSHA256(sha256: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withImageSHA256Internal(sha256)); + return new TestVaultResourcePromiseImpl(this._withImageSHA256Internal(sha256), this._client); } /** @internal */ @@ -26959,7 +27226,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds runtime arguments for the container */ withContainerRuntimeArgs(args: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withContainerRuntimeArgsInternal(args)); + return new TestVaultResourcePromiseImpl(this._withContainerRuntimeArgsInternal(args), this._client); } /** @internal */ @@ -26974,7 +27241,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the lifetime behavior of the container resource */ withLifetime(lifetime: ContainerLifetime): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withLifetimeInternal(lifetime)); + return new TestVaultResourcePromiseImpl(this._withLifetimeInternal(lifetime), this._client); } /** @internal */ @@ -26989,7 +27256,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container image pull policy */ withImagePullPolicy(pullPolicy: ImagePullPolicy): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withImagePullPolicyInternal(pullPolicy)); + return new TestVaultResourcePromiseImpl(this._withImagePullPolicyInternal(pullPolicy), this._client); } /** @internal */ @@ -27004,7 +27271,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures the resource to be published as a container */ publishAsContainer(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._publishAsContainerInternal()); + return new TestVaultResourcePromiseImpl(this._publishAsContainerInternal(), this._client); } /** @internal */ @@ -27023,7 +27290,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise { const dockerfilePath = options?.dockerfilePath; const stage = options?.stage; - return new TestVaultResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage)); + return new TestVaultResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } /** @internal */ @@ -27038,12 +27305,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container name */ withContainerName(name: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withContainerNameInternal(name)); + return new TestVaultResourcePromiseImpl(this._withContainerNameInternal(name), this._client); } /** @internal */ - private async _withBuildArgInternal(name: string, value: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -27052,13 +27320,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withBuildArgInternal(name, value)); + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -27067,8 +27336,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withBuildSecretInternal(name, value)); + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } /** @internal */ @@ -27083,7 +27352,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures endpoint proxy support */ withEndpointProxySupport(proxyEnabled: boolean): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEndpointProxySupportInternal(proxyEnabled)); + return new TestVaultResourcePromiseImpl(this._withEndpointProxySupportInternal(proxyEnabled), this._client); } /** @internal */ @@ -27102,7 +27371,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise { const buildImage = options?.buildImage; const runtimeImage = options?.runtimeImage; - return new TestVaultResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage)); + return new TestVaultResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } /** @internal */ @@ -27117,7 +27386,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a network alias for the container */ withContainerNetworkAlias(alias: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withContainerNetworkAliasInternal(alias)); + return new TestVaultResourcePromiseImpl(this._withContainerNetworkAliasInternal(alias), this._client); } /** @internal */ @@ -27136,7 +27405,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withMcpServer(options?: WithMcpServerOptions): TestVaultResourcePromise { const path = options?.path; const endpointName = options?.endpointName; - return new TestVaultResourcePromiseImpl(this._withMcpServerInternal(path, endpointName)); + return new TestVaultResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } /** @internal */ @@ -27151,7 +27420,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export */ withOtlpExporter(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withOtlpExporterInternal()); + return new TestVaultResourcePromiseImpl(this._withOtlpExporterInternal(), this._client); } /** @internal */ @@ -27166,7 +27435,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol)); + return new TestVaultResourcePromiseImpl(this._withOtlpExporterProtocolInternal(protocol), this._client); } /** @internal */ @@ -27181,7 +27450,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Publishes the resource as a connection string */ publishAsConnectionString(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._publishAsConnectionStringInternal()); + return new TestVaultResourcePromiseImpl(this._publishAsConnectionStringInternal(), this._client); } /** @internal */ @@ -27198,12 +27467,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise { const helpLink = options?.helpLink; - return new TestVaultResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink)); + return new TestVaultResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -27212,13 +27482,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentInternal(name, value)); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -27231,7 +27502,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value)); + return new TestVaultResourcePromiseImpl(this._withEnvironmentExpressionInternal(name, value), this._client); } /** @internal */ @@ -27251,12 +27522,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new TestVaultResourcePromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -27268,13 +27540,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference)); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -27286,13 +27559,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter)); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -27304,8 +27578,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource)); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ @@ -27320,7 +27594,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds arguments */ withArgs(args: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withArgsInternal(args)); + return new TestVaultResourcePromiseImpl(this._withArgsInternal(args), this._client); } /** @internal */ @@ -27340,12 +27614,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withArgsCallbackInternal(callback)); + return new TestVaultResourcePromiseImpl(this._withArgsCallbackInternal(callback), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -27357,11 +27632,11 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestVaultResourcePromise { + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new TestVaultResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new TestVaultResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -27376,12 +27651,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withReferenceUriInternal(name, uri)); + return new TestVaultResourcePromiseImpl(this._withReferenceUriInternal(name, uri), this._client); } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource): Promise { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -27390,13 +27666,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService)); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -27405,8 +27682,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference)); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -27437,7 +27714,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase const isProxied = options?.isProxied; const isExternal = options?.isExternal; const protocol = options?.protocol; - return new TestVaultResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol)); + return new TestVaultResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } /** @internal */ @@ -27462,7 +27739,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new TestVaultResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied)); + return new TestVaultResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -27487,7 +27764,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase const name = options?.name; const env = options?.env; const isProxied = options?.isProxied; - return new TestVaultResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied)); + return new TestVaultResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } /** @internal */ @@ -27502,7 +27779,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withExternalHttpEndpointsInternal()); + return new TestVaultResourcePromiseImpl(this._withExternalHttpEndpointsInternal(), this._client); } /** Gets an endpoint reference */ @@ -27526,7 +27803,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource for HTTP/2 */ asHttp2Service(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._asHttp2ServiceInternal()); + return new TestVaultResourcePromiseImpl(this._asHttp2ServiceInternal(), this._client); } /** @internal */ @@ -27546,7 +27823,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new TestVaultResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -27563,12 +27840,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestVaultResourcePromise { const displayText = options?.displayText; - return new TestVaultResourcePromiseImpl(this._withUrlInternal(url, displayText)); + return new TestVaultResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -27580,7 +27858,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestVaultResourcePromise { const displayText = options?.displayText; - return new TestVaultResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText)); + return new TestVaultResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } /** @internal */ @@ -27599,7 +27877,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new TestVaultResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -27619,7 +27897,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new TestVaultResourcePromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ @@ -27634,12 +27912,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Excludes the resource from the deployment manifest */ excludeFromManifest(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._excludeFromManifestInternal()); + return new TestVaultResourcePromiseImpl(this._excludeFromManifestInternal(), this._client); } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -27648,13 +27927,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._waitForInternal(dependency)); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -27663,13 +27943,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior)); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -27678,13 +27959,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._waitForStartInternal(dependency)); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -27693,8 +27975,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior)); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ @@ -27709,12 +27991,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Prevents resource from starting automatically */ withExplicitStart(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withExplicitStartInternal()); + return new TestVaultResourcePromiseImpl(this._withExplicitStartInternal(), this._client); } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, exitCode?: number): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -27724,9 +28007,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestVaultResourcePromise { + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise { const exitCode = options?.exitCode; - return new TestVaultResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new TestVaultResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } /** @internal */ @@ -27741,7 +28024,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a health check by key */ withHealthCheck(key: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withHealthCheckInternal(key)); + return new TestVaultResourcePromiseImpl(this._withHealthCheckInternal(key), this._client); } /** @internal */ @@ -27762,7 +28045,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase const path = options?.path; const statusCode = options?.statusCode; const endpointName = options?.endpointName; - return new TestVaultResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName)); + return new TestVaultResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } /** @internal */ @@ -27784,7 +28067,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise { const commandOptions = options?.commandOptions; - return new TestVaultResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new TestVaultResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ @@ -27799,7 +28082,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust)); + return new TestVaultResourcePromiseImpl(this._withDeveloperCertificateTrustInternal(trust), this._client); } /** @internal */ @@ -27814,13 +28097,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope)); + return new TestVaultResourcePromiseImpl(this._withCertificateTrustScopeInternal(scope), this._client); } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -27831,7 +28115,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestVaultResourcePromise { const password = options?.password; - return new TestVaultResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password)); + return new TestVaultResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } /** @internal */ @@ -27846,12 +28130,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withoutHttpsCertificateInternal()); + return new TestVaultResourcePromiseImpl(this._withoutHttpsCertificateInternal(), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -27860,13 +28145,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withParentRelationshipInternal(parent)); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -27875,8 +28161,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withChildRelationshipInternal(child)); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -27893,7 +28179,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise { const iconVariant = options?.iconVariant; - return new TestVaultResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant)); + return new TestVaultResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } /** @internal */ @@ -27922,7 +28208,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase const failureThreshold = options?.failureThreshold; const successThreshold = options?.successThreshold; const endpointName = options?.endpointName; - return new TestVaultResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName)); + return new TestVaultResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } /** @internal */ @@ -27937,7 +28223,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Excludes the resource from MCP server exposure */ excludeFromMcp(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._excludeFromMcpInternal()); + return new TestVaultResourcePromiseImpl(this._excludeFromMcpInternal(), this._client); } /** @internal */ @@ -27952,7 +28238,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName)); + return new TestVaultResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName), this._client); } /** @internal */ @@ -27967,7 +28253,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag)); + return new TestVaultResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag), this._client); } /** @internal */ @@ -27995,7 +28281,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase const requiredBy = options?.requiredBy; const tags = options?.tags; const description = options?.description; - return new TestVaultResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description)); + return new TestVaultResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } /** @internal */ @@ -28015,7 +28301,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new TestVaultResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** @internal */ @@ -28034,7 +28320,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withVolume(target: string, options?: WithVolumeOptions): TestVaultResourcePromise { const name = options?.name; const isReadOnly = options?.isReadOnly; - return new TestVaultResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly)); + return new TestVaultResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } /** Gets the resource name */ @@ -28063,7 +28349,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new TestVaultResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -28083,7 +28369,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new TestVaultResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -28103,7 +28389,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new TestVaultResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -28123,7 +28409,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new TestVaultResourcePromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } /** @internal */ @@ -28143,7 +28429,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new TestVaultResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -28162,7 +28448,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -28177,7 +28463,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withConfigInternal(config)); + return new TestVaultResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -28197,7 +28483,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new TestVaultResourcePromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -28212,7 +28498,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new TestVaultResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -28227,7 +28513,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new TestVaultResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -28242,7 +28528,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new TestVaultResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -28264,7 +28550,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { const callback = options?.callback; - return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -28279,7 +28565,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the resource status */ withStatus(status: TestResourceStatus): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withStatusInternal(status)); + return new TestVaultResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -28294,7 +28580,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new TestVaultResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -28314,12 +28600,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withValidatorInternal(validator)); + return new TestVaultResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -28328,13 +28615,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -28343,13 +28631,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -28358,8 +28647,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -28374,7 +28663,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new TestVaultResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -28389,7 +28678,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new TestVaultResourcePromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } /** @internal */ @@ -28408,7 +28697,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new TestVaultResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -28423,7 +28712,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures vault using direct interface target */ withVaultDirect(option: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withVaultDirectInternal(option)); + return new TestVaultResourcePromiseImpl(this._withVaultDirectInternal(option), this._client); } /** @internal */ @@ -28438,7 +28727,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a label to the resource */ withMergeLabel(label: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new TestVaultResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -28453,7 +28742,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new TestVaultResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -28468,7 +28757,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new TestVaultResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -28483,7 +28772,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new TestVaultResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -28502,7 +28791,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -28521,7 +28810,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -28536,7 +28825,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new TestVaultResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -28551,7 +28840,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new TestVaultResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -28562,7 +28851,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: TestVaultResource) => TResult1 | PromiseLike) | null, @@ -28572,123 +28863,123 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBindMount(source, target, options)), this._client); } /** Sets the container entrypoint */ withEntrypoint(entrypoint: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEntrypoint(entrypoint)), this._client); } /** Sets the container image tag */ withImageTag(tag: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImageTag(tag)), this._client); } /** Sets the container image registry */ withImageRegistry(registry: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImageRegistry(registry)), this._client); } /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImage(image, options)), this._client); } /** Sets the image SHA256 digest */ withImageSHA256(sha256: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImageSHA256(sha256)), this._client); } /** Adds runtime arguments for the container */ withContainerRuntimeArgs(args: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerRuntimeArgs(args)), this._client); } /** Sets the lifetime behavior of the container resource */ withLifetime(lifetime: ContainerLifetime): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withLifetime(lifetime)), this._client); } /** Sets the container image pull policy */ withImagePullPolicy(pullPolicy: ImagePullPolicy): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withImagePullPolicy(pullPolicy)), this._client); } /** Configures the resource to be published as a container */ publishAsContainer(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.publishAsContainer()), this._client); } /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDockerfile(contextPath, options)), this._client); } /** Sets the container name */ withContainerName(name: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerName(name)), this._client); } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value))); + withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value))); + withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } /** Configures endpoint proxy support */ withEndpointProxySupport(proxyEnabled: boolean): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpointProxySupport(proxyEnabled)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds a network alias for the container */ withContainerNetworkAlias(alias: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerNetworkAlias(alias)), this._client); } /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Configures OTLP telemetry export */ withOtlpExporter(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Publishes the resource as a connection string */ publishAsConnectionString(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.publishAsConnectionString()), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -28696,86 +28987,86 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds arguments */ withArgs(args: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -28785,152 +29076,152 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { /** Configures resource for HTTP/2 */ asHttp2Service(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withVolume(target, options)), this._client); } /** Gets the resource name */ @@ -28940,152 +29231,152 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Configures vault using direct interface target */ withVaultDirect(option: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withVaultDirect(option))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withVaultDirect(option)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): TestVaultResourcePromise { - return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -29126,7 +29417,7 @@ class ComputeResourceImpl extends ResourceBuilderBase im /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): ComputeResourcePromise { - return new ComputeResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName)); + return new ComputeResourcePromiseImpl(this._withRemoteImageNameInternal(remoteImageName), this._client); } /** @internal */ @@ -29141,7 +29432,7 @@ class ComputeResourceImpl extends ResourceBuilderBase im /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): ComputeResourcePromise { - return new ComputeResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag)); + return new ComputeResourcePromiseImpl(this._withRemoteImageTagInternal(remoteImageTag), this._client); } } @@ -29152,7 +29443,9 @@ class ComputeResourceImpl extends ResourceBuilderBase im * await builder.addSomething().withX().withY(); */ class ComputeResourcePromiseImpl implements ComputeResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ComputeResource) => TResult1 | PromiseLike) | null, @@ -29163,12 +29456,12 @@ class ComputeResourcePromiseImpl implements ComputeResourcePromise { /** Sets the remote image name for publishing */ withRemoteImageName(remoteImageName: string): ComputeResourcePromise { - return new ComputeResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName))); + return new ComputeResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageName(remoteImageName)), this._client); } /** Sets the remote image tag for publishing */ withRemoteImageTag(remoteImageTag: string): ComputeResourcePromise { - return new ComputeResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag))); + return new ComputeResourcePromiseImpl(this._promise.then(obj => obj.withRemoteImageTag(remoteImageTag)), this._client); } } @@ -29179,11 +29472,11 @@ class ComputeResourcePromiseImpl implements ComputeResourcePromise { export interface ContainerFilesDestinationResource { toJSON(): MarshalledHandle; - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): ContainerFilesDestinationResourcePromise; + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ContainerFilesDestinationResourcePromise; } export interface ContainerFilesDestinationResourcePromise extends PromiseLike { - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): ContainerFilesDestinationResourcePromise; + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ContainerFilesDestinationResourcePromise; } // ============================================================================ @@ -29196,8 +29489,9 @@ class ContainerFilesDestinationResourceImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, source, destinationPath }; + private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved, destinationPath }; const result = await this._client.invokeCapability( 'Aspire.Hosting/publishWithContainerFilesFromResource', rpcArgs @@ -29206,8 +29500,8 @@ class ContainerFilesDestinationResourceImpl extends ResourceBuilderBase, destinationPath: string): ContainerFilesDestinationResourcePromise { + return new ContainerFilesDestinationResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath), this._client); } } @@ -29218,7 +29512,9 @@ class ContainerFilesDestinationResourceImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ContainerFilesDestinationResource) => TResult1 | PromiseLike) | null, @@ -29228,8 +29524,8 @@ class ContainerFilesDestinationResourcePromiseImpl implements ContainerFilesDest } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles, destinationPath: string): ContainerFilesDestinationResourcePromise { - return new ContainerFilesDestinationResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath))); + publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ContainerFilesDestinationResourcePromise { + return new ContainerFilesDestinationResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath)), this._client); } } @@ -29240,7 +29536,7 @@ class ContainerFilesDestinationResourcePromiseImpl implements ContainerFilesDest export interface Resource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ResourcePromise; @@ -29251,8 +29547,8 @@ export interface Resource { withExplicitStart(): ResourcePromise; withHealthCheck(key: string): ResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise; excludeFromMcp(): ResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ResourcePromise; @@ -29271,9 +29567,9 @@ export interface Resource { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -29287,7 +29583,7 @@ export interface Resource { } export interface ResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ResourcePromise; @@ -29298,8 +29594,8 @@ export interface ResourcePromise extends PromiseLike { withExplicitStart(): ResourcePromise; withHealthCheck(key: string): ResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise; excludeFromMcp(): ResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ResourcePromise; @@ -29318,9 +29614,9 @@ export interface ResourcePromise extends PromiseLike { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise; + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -29343,8 +29639,9 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, registry }; + private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const registry_resolved = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -29353,8 +29650,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._withContainerRegistryInternal(registry)); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } /** @internal */ @@ -29373,7 +29670,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise { const buildImage = options?.buildImage; const runtimeImage = options?.runtimeImage; - return new ResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage)); + return new ResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } /** @internal */ @@ -29390,7 +29687,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise { const helpLink = options?.helpLink; - return new ResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink)); + return new ResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ @@ -29410,7 +29707,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._withUrlsCallbackInternal(callback)); + return new ResourcePromiseImpl(this._withUrlsCallbackInternal(callback), this._client); } /** @internal */ @@ -29427,12 +29724,13 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ResourcePromise { const displayText = options?.displayText; - return new ResourcePromiseImpl(this._withUrlInternal(url, displayText)); + return new ResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const rpcArgs: Record = { builder: this._handle, url }; + const url_resolved = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url: url_resolved }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -29444,7 +29742,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ResourcePromise { const displayText = options?.displayText; - return new ResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText)); + return new ResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } /** @internal */ @@ -29463,7 +29761,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback)); + return new ResourcePromiseImpl(this._withUrlForEndpointInternal(endpointName, callback), this._client); } /** @internal */ @@ -29478,7 +29776,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ResourcePromise { - return new ResourcePromiseImpl(this._excludeFromManifestInternal()); + return new ResourcePromiseImpl(this._excludeFromManifestInternal(), this._client); } /** @internal */ @@ -29493,7 +29791,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Prevents resource from starting automatically */ withExplicitStart(): ResourcePromise { - return new ResourcePromiseImpl(this._withExplicitStartInternal()); + return new ResourcePromiseImpl(this._withExplicitStartInternal(), this._client); } /** @internal */ @@ -29508,7 +29806,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a health check by key */ withHealthCheck(key: string): ResourcePromise { - return new ResourcePromiseImpl(this._withHealthCheckInternal(key)); + return new ResourcePromiseImpl(this._withHealthCheckInternal(key), this._client); } /** @internal */ @@ -29530,12 +29828,13 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise { const commandOptions = options?.commandOptions; - return new ResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions)); + return new ResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, parent }; + private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const parent_resolved = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -29544,13 +29843,14 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._withParentRelationshipInternal(parent)); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, child }; + private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const child_resolved = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child: child_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -29559,8 +29859,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._withChildRelationshipInternal(child)); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } /** @internal */ @@ -29577,7 +29877,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise { const iconVariant = options?.iconVariant; - return new ResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant)); + return new ResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } /** @internal */ @@ -29592,7 +29892,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ResourcePromise { - return new ResourcePromiseImpl(this._excludeFromMcpInternal()); + return new ResourcePromiseImpl(this._excludeFromMcpInternal(), this._client); } /** @internal */ @@ -29620,7 +29920,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou const requiredBy = options?.requiredBy; const tags = options?.tags; const description = options?.description; - return new ResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description)); + return new ResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } /** @internal */ @@ -29640,7 +29940,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._withPipelineConfigurationInternal(callback)); + return new ResourcePromiseImpl(this._withPipelineConfigurationInternal(callback), this._client); } /** Gets the resource name */ @@ -29669,7 +29969,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback)); + return new ResourcePromiseImpl(this._onBeforeResourceStartedInternal(callback), this._client); } /** @internal */ @@ -29689,7 +29989,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._onResourceStoppedInternal(callback)); + return new ResourcePromiseImpl(this._onResourceStoppedInternal(callback), this._client); } /** @internal */ @@ -29709,7 +30009,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._onInitializeResourceInternal(callback)); + return new ResourcePromiseImpl(this._onInitializeResourceInternal(callback), this._client); } /** @internal */ @@ -29729,7 +30029,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._onResourceReadyInternal(callback)); + return new ResourcePromiseImpl(this._onResourceReadyInternal(callback), this._client); } /** @internal */ @@ -29748,7 +30048,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { const value = options?.value; const enabled = options?.enabled; - return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled)); + return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } /** @internal */ @@ -29763,7 +30063,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ResourcePromise { - return new ResourcePromiseImpl(this._withConfigInternal(config)); + return new ResourcePromiseImpl(this._withConfigInternal(config), this._client); } /** @internal */ @@ -29778,7 +30078,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the created timestamp */ withCreatedAt(createdAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._withCreatedAtInternal(createdAt)); + return new ResourcePromiseImpl(this._withCreatedAtInternal(createdAt), this._client); } /** @internal */ @@ -29793,7 +30093,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt)); + return new ResourcePromiseImpl(this._withModifiedAtInternal(modifiedAt), this._client); } /** @internal */ @@ -29808,7 +30108,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the correlation ID */ withCorrelationId(correlationId: string): ResourcePromise { - return new ResourcePromiseImpl(this._withCorrelationIdInternal(correlationId)); + return new ResourcePromiseImpl(this._withCorrelationIdInternal(correlationId), this._client); } /** @internal */ @@ -29830,7 +30130,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { const callback = options?.callback; - return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback)); + return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } /** @internal */ @@ -29845,7 +30145,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the resource status */ withStatus(status: TestResourceStatus): ResourcePromise { - return new ResourcePromiseImpl(this._withStatusInternal(status)); + return new ResourcePromiseImpl(this._withStatusInternal(status), this._client); } /** @internal */ @@ -29860,7 +30160,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ResourcePromise { - return new ResourcePromiseImpl(this._withNestedConfigInternal(config)); + return new ResourcePromiseImpl(this._withNestedConfigInternal(config), this._client); } /** @internal */ @@ -29880,12 +30180,13 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._withValidatorInternal(validator)); + return new ResourcePromiseImpl(this._withValidatorInternal(validator), this._client); } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -29894,13 +30195,14 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._testWaitForInternal(dependency)); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -29909,13 +30211,14 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._withDependencyInternal(dependency)); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -29924,8 +30227,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._withUnionDependencyInternal(dependency)); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } /** @internal */ @@ -29940,7 +30243,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the endpoints */ withEndpoints(endpoints: string[]): ResourcePromise { - return new ResourcePromiseImpl(this._withEndpointsInternal(endpoints)); + return new ResourcePromiseImpl(this._withEndpointsInternal(endpoints), this._client); } /** @internal */ @@ -29959,7 +30262,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._withCancellableOperationInternal(operation)); + return new ResourcePromiseImpl(this._withCancellableOperationInternal(operation), this._client); } /** @internal */ @@ -29974,7 +30277,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a label to the resource */ withMergeLabel(label: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeLabelInternal(label)); + return new ResourcePromiseImpl(this._withMergeLabelInternal(label), this._client); } /** @internal */ @@ -29989,7 +30292,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category)); + return new ResourcePromiseImpl(this._withMergeLabelCategorizedInternal(label, category), this._client); } /** @internal */ @@ -30004,7 +30307,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port)); + return new ResourcePromiseImpl(this._withMergeEndpointInternal(endpointName, port), this._client); } /** @internal */ @@ -30019,7 +30322,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme)); + return new ResourcePromiseImpl(this._withMergeEndpointSchemeInternal(endpointName, port, scheme), this._client); } /** @internal */ @@ -30038,7 +30341,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles)); + return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } /** @internal */ @@ -30057,7 +30360,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { const enableConsole = options?.enableConsole; const maxFiles = options?.maxFiles; - return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles)); + return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } /** @internal */ @@ -30072,7 +30375,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority)); + return new ResourcePromiseImpl(this._withMergeRouteInternal(path, method, handler, priority), this._client); } /** @internal */ @@ -30087,7 +30390,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ResourcePromise { - return new ResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware)); + return new ResourcePromiseImpl(this._withMergeRouteMiddlewareInternal(path, method, handler, priority, middleware), this._client); } } @@ -30098,7 +30401,9 @@ class ResourceImpl extends ResourceBuilderBase implements Resou * await builder.addSomething().withX().withY(); */ class ResourcePromiseImpl implements ResourcePromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: Resource) => TResult1 | PromiseLike) | null, @@ -30108,88 +30413,88 @@ class ResourcePromiseImpl implements ResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry))); + withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withDockerfileBaseImage(options)), this._client); } /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withRequiredCommand(command, options)), this._client); } /** Customizes displayed URLs via callback */ withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrlsCallback(callback)), this._client); } /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrl(url, options)), this._client); } /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrlExpression(url, options)), this._client); } /** Customizes the URL for a specific endpoint via callback */ withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withUrlForEndpoint(endpointName, callback)), this._client); } /** Excludes the resource from the deployment manifest */ excludeFromManifest(): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest())); + return new ResourcePromiseImpl(this._promise.then(obj => obj.excludeFromManifest()), this._client); } /** Prevents resource from starting automatically */ withExplicitStart(): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart())); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withExplicitStart()), this._client); } /** Adds a health check by key */ withHealthCheck(key: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withHealthCheck(key)), this._client); } /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withCommand(name, displayName, executeCommand, options)), this._client); } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent))); + withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child))); + withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withIconName(iconName, options)), this._client); } /** Excludes the resource from MCP server exposure */ excludeFromMcp(): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp())); + return new ResourcePromiseImpl(this._promise.then(obj => obj.excludeFromMcp()), this._client); } /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withPipelineStepFactory(stepName, callback, options)), this._client); } /** Configures pipeline step dependencies via a callback */ withPipelineConfiguration(callback: (obj: PipelineConfigurationContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withPipelineConfiguration(callback)), this._client); } /** Gets the resource name */ @@ -30199,132 +30504,132 @@ class ResourcePromiseImpl implements ResourcePromise { /** Subscribes to the BeforeResourceStarted event */ onBeforeResourceStarted(callback: (arg: BeforeResourceStartedEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.onBeforeResourceStarted(callback)), this._client); } /** Subscribes to the ResourceStopped event */ onResourceStopped(callback: (arg: ResourceStoppedEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.onResourceStopped(callback)), this._client); } /** Subscribes to the InitializeResource event */ onInitializeResource(callback: (arg: InitializeResourceEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.onInitializeResource(callback)), this._client); } /** Subscribes to the ResourceReady event */ onResourceReady(callback: (arg: ResourceReadyEvent) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.onResourceReady(callback)), this._client); } /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalString(options)), this._client); } /** Configures the resource with a DTO */ withConfig(config: TestConfigDto): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withConfig(config)), this._client); } /** Sets the created timestamp */ withCreatedAt(createdAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withCreatedAt(createdAt)), this._client); } /** Sets the modified timestamp */ withModifiedAt(modifiedAt: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withModifiedAt(modifiedAt)), this._client); } /** Sets the correlation ID */ withCorrelationId(correlationId: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withCorrelationId(correlationId)), this._client); } /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withOptionalCallback(options)), this._client); } /** Sets the resource status */ withStatus(status: TestResourceStatus): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withStatus(status)), this._client); } /** Configures with nested DTO */ withNestedConfig(config: TestNestedDto): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withNestedConfig(config)), this._client); } /** Adds validation callback */ withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withValidator(validator)), this._client); } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency))); + testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency))); + withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency))); + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + return new ResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } /** Sets the endpoints */ withEndpoints(endpoints: string[]): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withEndpoints(endpoints)), this._client); } /** Performs a cancellable operation */ withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withCancellableOperation(operation)), this._client); } /** Adds a label to the resource */ withMergeLabel(label: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabel(label)), this._client); } /** Adds a categorized label to the resource */ withMergeLabelCategorized(label: string, category: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLabelCategorized(label, category)), this._client); } /** Configures a named endpoint */ withMergeEndpoint(endpointName: string, port: number): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpoint(endpointName, port)), this._client); } /** Configures a named endpoint with scheme */ withMergeEndpointScheme(endpointName: string, port: number, scheme: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeEndpointScheme(endpointName, port, scheme)), this._client); } /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLogging(logLevel, options)), this._client); } /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeLoggingPath(logLevel, logPath, options)), this._client); } /** Configures a route */ withMergeRoute(path: string, method: string, handler: string, priority: number): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRoute(path, method, handler, priority)), this._client); } /** Configures a route with middleware */ withMergeRouteMiddleware(path: string, method: string, handler: string, priority: number, middleware: string): ResourcePromise { - return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware))); + return new ResourcePromiseImpl(this._promise.then(obj => obj.withMergeRouteMiddleware(path, method, handler, priority, middleware)), this._client); } } @@ -30365,7 +30670,7 @@ class ResourceWithArgsImpl extends ResourceBuilderBase /** Adds arguments */ withArgs(args: string[]): ResourceWithArgsPromise { - return new ResourceWithArgsPromiseImpl(this._withArgsInternal(args)); + return new ResourceWithArgsPromiseImpl(this._withArgsInternal(args), this._client); } /** @internal */ @@ -30385,7 +30690,7 @@ class ResourceWithArgsImpl extends ResourceBuilderBase /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ResourceWithArgsPromise { - return new ResourceWithArgsPromiseImpl(this._withArgsCallbackInternal(callback)); + return new ResourceWithArgsPromiseImpl(this._withArgsCallbackInternal(callback), this._client); } } @@ -30396,7 +30701,9 @@ class ResourceWithArgsImpl extends ResourceBuilderBase * await builder.addSomething().withX().withY(); */ class ResourceWithArgsPromiseImpl implements ResourceWithArgsPromise { - constructor(private _promise: Promise) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithArgs) => TResult1 | PromiseLike) | null, @@ -30407,12 +30714,12 @@ class ResourceWithArgsPromiseImpl implements ResourceWithArgsPromise { /** Adds arguments */ withArgs(args: string[]): ResourceWithArgsPromise { - return new ResourceWithArgsPromiseImpl(this._promise.then(obj => obj.withArgs(args))); + return new ResourceWithArgsPromiseImpl(this._promise.then(obj => obj.withArgs(args)), this._client); } /** Sets command-line arguments via callback */ withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ResourceWithArgsPromise { - return new ResourceWithArgsPromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback))); + return new ResourceWithArgsPromiseImpl(this._promise.then(obj => obj.withArgsCallback(callback)), this._client); } } @@ -30451,7 +30758,8 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', rpcArgs @@ -30461,7 +30769,7 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase Promise): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._onConnectionStringAvailableInternal(callback)); + return new ResourceWithConnectionStringPromiseImpl(this._onConnectionStringAvailableInternal(callback), this._client); } /** @internal */ private async _withConnectionStringInternal(connectionString: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, connectionString }; + const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -30520,7 +30829,7 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithConnectionString) => TResult1 | PromiseLike) | null, @@ -30557,12 +30868,12 @@ class ResourceWithConnectionStringPromiseImpl implements ResourceWithConnectionS /** Adds a connection property with a reference expression */ withConnectionProperty(name: string, value: ReferenceExpression): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionProperty(name, value))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionProperty(name, value)), this._client); } /** Adds a connection property with a string value */ withConnectionPropertyValue(name: string, value: string): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionPropertyValue(name, value))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionPropertyValue(name, value)), this._client); } /** Gets a connection property by key */ @@ -30572,17 +30883,17 @@ class ResourceWithConnectionStringPromiseImpl implements ResourceWithConnectionS /** Subscribes to the ConnectionStringAvailable event */ onConnectionStringAvailable(callback: (arg: ConnectionStringAvailableEvent) => Promise): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.onConnectionStringAvailable(callback))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.onConnectionStringAvailable(callback)), this._client); } /** Sets the connection string using a reference expression */ withConnectionString(connectionString: ReferenceExpression): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionString(connectionString)), this._client); } /** Sets connection string using direct interface target */ withConnectionStringDirect(connectionString: string): ResourceWithConnectionStringPromise { - return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString))); + return new ResourceWithConnectionStringPromiseImpl(this._promise.then(obj => obj.withConnectionStringDirect(connectionString)), this._client); } } @@ -30623,7 +30934,7 @@ class ResourceWithContainerFilesImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithContainerFiles) => TResult1 | PromiseLike) | null, @@ -30660,12 +30973,12 @@ class ResourceWithContainerFilesPromiseImpl implements ResourceWithContainerFile /** Sets the source directory for container files */ withContainerFilesSource(sourcePath: string): ResourceWithContainerFilesPromise { - return new ResourceWithContainerFilesPromiseImpl(this._promise.then(obj => obj.withContainerFilesSource(sourcePath))); + return new ResourceWithContainerFilesPromiseImpl(this._promise.then(obj => obj.withContainerFilesSource(sourcePath)), this._client); } /** Clears all container file sources */ clearContainerFilesSources(): ResourceWithContainerFilesPromise { - return new ResourceWithContainerFilesPromiseImpl(this._promise.then(obj => obj.clearContainerFilesSources())); + return new ResourceWithContainerFilesPromiseImpl(this._promise.then(obj => obj.clearContainerFilesSources()), this._client); } } @@ -30728,7 +31041,7 @@ class ResourceWithEndpointsImpl extends ResourceBuilderBase Promise): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback)); + return new ResourceWithEndpointsPromiseImpl(this._withUrlForEndpointFactoryInternal(endpointName, callback), this._client); } /** @internal */ @@ -30889,7 +31202,7 @@ class ResourceWithEndpointsImpl extends ResourceBuilderBase Promise): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._onResourceEndpointsAllocatedInternal(callback)); + return new ResourceWithEndpointsPromiseImpl(this._onResourceEndpointsAllocatedInternal(callback), this._client); } } @@ -30949,7 +31262,9 @@ class ResourceWithEndpointsImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithEndpoints) => TResult1 | PromiseLike) | null, @@ -30960,27 +31275,27 @@ class ResourceWithEndpointsPromiseImpl implements ResourceWithEndpointsPromise { /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withMcpServer(options))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withMcpServer(options)), this._client); } /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withEndpoint(options))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withEndpoint(options)), this._client); } /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpEndpoint(options)), this._client); } /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpsEndpoint(options)), this._client); } /** Makes HTTP endpoints externally accessible */ withExternalHttpEndpoints(): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints())); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withExternalHttpEndpoints()), this._client); } /** Gets an endpoint reference */ @@ -30990,27 +31305,27 @@ class ResourceWithEndpointsPromiseImpl implements ResourceWithEndpointsPromise { /** Configures resource for HTTP/2 */ asHttp2Service(): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.asHttp2Service())); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.asHttp2Service()), this._client); } /** Adds a URL for a specific endpoint via factory callback */ withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withUrlForEndpointFactory(endpointName, callback)), this._client); } /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpHealthCheck(options)), this._client); } /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.withHttpProbe(probeType, options)), this._client); } /** Subscribes to the ResourceEndpointsAllocated event */ onResourceEndpointsAllocated(callback: (arg: ResourceEndpointsAllocatedEvent) => Promise): ResourceWithEndpointsPromise { - return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback))); + return new ResourceWithEndpointsPromiseImpl(this._promise.then(obj => obj.onResourceEndpointsAllocated(callback)), this._client); } } @@ -31023,16 +31338,16 @@ export interface ResourceWithEnvironment { toJSON(): MarshalledHandle; withOtlpExporter(): ResourceWithEnvironmentPromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ResourceWithEnvironmentPromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ResourceWithEnvironmentPromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ResourceWithEnvironmentPromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ResourceWithEnvironmentPromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ResourceWithEnvironmentPromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourceWithEnvironmentPromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ResourceWithEnvironmentPromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourceWithEnvironmentPromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; withReferenceUri(name: string, uri: string): ResourceWithEnvironmentPromise; - withReferenceExternalService(externalService: ExternalServiceResource): ResourceWithEnvironmentPromise; - withReferenceEndpoint(endpointReference: EndpointReference): ResourceWithEnvironmentPromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ResourceWithEnvironmentPromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; withDeveloperCertificateTrust(trust: boolean): ResourceWithEnvironmentPromise; withCertificateTrustScope(scope: CertificateTrustScope): ResourceWithEnvironmentPromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ResourceWithEnvironmentPromise; @@ -31044,16 +31359,16 @@ export interface ResourceWithEnvironment { export interface ResourceWithEnvironmentPromise extends PromiseLike { withOtlpExporter(): ResourceWithEnvironmentPromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ResourceWithEnvironmentPromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ResourceWithEnvironmentPromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ResourceWithEnvironmentPromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ResourceWithEnvironmentPromise; - withEnvironmentParameter(name: string, parameter: ParameterResource): ResourceWithEnvironmentPromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourceWithEnvironmentPromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ResourceWithEnvironmentPromise; + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourceWithEnvironmentPromise; + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; withReferenceUri(name: string, uri: string): ResourceWithEnvironmentPromise; - withReferenceExternalService(externalService: ExternalServiceResource): ResourceWithEnvironmentPromise; - withReferenceEndpoint(endpointReference: EndpointReference): ResourceWithEnvironmentPromise; + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ResourceWithEnvironmentPromise; + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; withDeveloperCertificateTrust(trust: boolean): ResourceWithEnvironmentPromise; withCertificateTrustScope(scope: CertificateTrustScope): ResourceWithEnvironmentPromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ResourceWithEnvironmentPromise; @@ -31083,7 +31398,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, name, value }; + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -31112,13 +31428,14 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const rpcArgs: Record = { builder: this._handle, name, value }; + const value_resolved = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -31131,7 +31448,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase Promise): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentCallbackInternal(callback)); + return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentCallbackInternal(callback), this._client); } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, name, endpointReference }; + private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -31168,13 +31486,14 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource): Promise { - const rpcArgs: Record = { builder: this._handle, name, parameter }; + private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -31186,13 +31505,14 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): Promise { - const rpcArgs: Record = { builder: this._handle, envVarName, resource }; + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + const resource_resolved = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -31204,13 +31524,14 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, connectionName?: string, optional?: boolean, name?: string): Promise { - const rpcArgs: Record = { builder: this._handle, source }; + private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + const source_resolved = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source: source_resolved }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -31222,11 +31543,11 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; - return new ResourceWithEnvironmentPromiseImpl(this._withReferenceInternal(source, connectionName, optional, name)); + return new ResourceWithEnvironmentPromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } /** @internal */ @@ -31241,12 +31562,13 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, externalService }; + private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -31255,13 +31577,14 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference): Promise { - const rpcArgs: Record = { builder: this._handle, endpointReference }; + private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -31270,8 +31593,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } /** @internal */ @@ -31286,7 +31609,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase { + private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + const password_resolved = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password; + if (password !== undefined) rpcArgs.password = password_resolved; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -31318,7 +31642,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase Promise): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._testWithEnvironmentCallbackInternal(callback)); + return new ResourceWithEnvironmentPromiseImpl(this._testWithEnvironmentCallbackInternal(callback), this._client); } /** @internal */ @@ -31368,7 +31692,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentVariablesInternal(variables)); + return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentVariablesInternal(variables), this._client); } } @@ -31379,7 +31703,9 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithEnvironment) => TResult1 | PromiseLike) | null, @@ -31390,17 +31716,17 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi /** Configures OTLP telemetry export */ withOtlpExporter(): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withOtlpExporter())); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withOtlpExporter()), this._client); } /** Configures OTLP telemetry export with specific protocol */ withOtlpExporterProtocol(protocol: OtlpProtocol): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withOtlpExporterProtocol(protocol)), this._client); } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value))); + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } /** @@ -31408,86 +31734,86 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi * @deprecated ATS compatibility shim. Use withEnvironment instead. */ withEnvironmentExpression(name: string, value: ReferenceExpression): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentExpression(name, value)), this._client); } /** Sets environment variables via callback */ withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentCallback(callback)), this._client); } /** * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference))); + withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } /** * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter))); + withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } /** * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource))); + withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReference(source, options))); + withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } /** Adds a reference to a URI */ withReferenceUri(name: string, uri: string): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceUri(name, uri)), this._client); } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService))); + withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference))); + withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise { + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } /** Configures developer certificate trust */ withDeveloperCertificateTrust(trust: boolean): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withDeveloperCertificateTrust(trust)), this._client); } /** Sets the certificate trust scope */ withCertificateTrustScope(scope: CertificateTrustScope): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withCertificateTrustScope(scope)), this._client); } /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withHttpsDeveloperCertificate(options)), this._client); } /** Removes HTTPS certificate configuration */ withoutHttpsCertificate(): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate())); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withoutHttpsCertificate()), this._client); } /** Configures environment with callback (test version) */ testWithEnvironmentCallback(callback: (arg: TestEnvironmentContext) => Promise): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.testWithEnvironmentCallback(callback)), this._client); } /** Sets environment variables */ withEnvironmentVariables(variables: Record): ResourceWithEnvironmentPromise { - return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables))); + return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentVariables(variables)), this._client); } } @@ -31498,19 +31824,19 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi export interface ResourceWithWaitSupport { toJSON(): MarshalledHandle; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceWithWaitSupportPromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceWithWaitSupportPromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; } export interface ResourceWithWaitSupportPromise extends PromiseLike { - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceWithWaitSupportPromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceWithWaitSupportPromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; } // ============================================================================ @@ -31523,8 +31849,9 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -31533,13 +31860,14 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -31548,13 +31876,14 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -31563,13 +31892,14 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): Promise { - const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; + private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -31578,13 +31908,14 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, exitCode?: number): Promise { - const rpcArgs: Record = { builder: this._handle, dependency }; + private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -31594,9 +31925,9 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { const exitCode = options?.exitCode; - return new ResourceWithWaitSupportPromiseImpl(this._waitForCompletionInternal(dependency, exitCode)); + return new ResourceWithWaitSupportPromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } } @@ -31607,7 +31938,9 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase) {} + constructor(private _promise: Promise, private _client: AspireClientRpc) { + _client.trackPromise(_promise); + } then( onfulfilled?: ((value: ResourceWithWaitSupport) => TResult1 | PromiseLike) | null, @@ -31617,28 +31950,28 @@ class ResourceWithWaitSupportPromiseImpl implements ResourceWithWaitSupportPromi } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceWithWaitSupportPromise { - return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitFor(dependency))); + waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { - return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior))); + waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource): ResourceWithWaitSupportPromise { - return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForStart(dependency))); + waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { - return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior))); + waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { - return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options))); + waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { + return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } } diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts index 01233e6f1d6..b877bda9c91 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts @@ -14,6 +14,8 @@ export interface AspireClientRpc { readonly connected: boolean; invokeCapability(capabilityId: string, args?: Record): Promise; cancelToken(cancellationId: string): Promise; + trackPromise(promise: Promise): void; + flushPendingPromises(): Promise; } /** @@ -383,7 +385,7 @@ export class AppHostUsageError extends Error { } } -function isPromiseLike(value: unknown): value is PromiseLike { +export function isPromiseLike(value: unknown): value is PromiseLike { return ( value !== null && (typeof value === 'object' || typeof value === 'function') && @@ -753,9 +755,24 @@ export class AspireClient implements AspireClientRpc { private _pendingCalls = 0; private _connectPromise: Promise | null = null; private _disconnectNotified = false; + private _pendingPromises: Set> = new Set(); constructor(private socketPath: string) { } + trackPromise(promise: Promise): void { + this._pendingPromises.add(promise); + promise.then( + () => this._pendingPromises.delete(promise), + () => this._pendingPromises.delete(promise) + ); + } + + async flushPendingPromises(): Promise { + while (this._pendingPromises.size > 0) { + await Promise.all(this._pendingPromises); + } + } + /** * Register a callback to be called when the connection is lost */ diff --git a/tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs b/tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs new file mode 100644 index 00000000000..9b9414c4276 --- /dev/null +++ b/tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs @@ -0,0 +1,53 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Aspire.Hosting.Tests; + +public class PublishedRuntimeReferenceDiagnosticTests +{ + [Fact] + public void MissingPublishedRuntimeMessage_ExplainsExcludedResources() + { + var resource = new ContainerResource("excluded"); + resource.Annotations.Add(ManifestPublishingCallbackAnnotation.Ignore); + + var model = new DistributedApplicationModel([resource]); + + var message = model.GetMissingPublishedRuntimeReferenceMessage(resource, "Docker Compose"); + + Assert.Equal("Resource 'excluded' is referenced by Docker Compose, but it was excluded from publish. If that exclusion is intentional, mark the reference optional.", message); + } + + [Fact] + public void MissingPublishedRuntimeMessage_ExplainsBuildOnlyResourcesWithNoConsumers() + { + var resource = new ContainerResource("frontend"); + resource.Annotations.Add(new DockerfileBuildAnnotation(".", "Dockerfile", null) { HasEntrypoint = false }); + + var model = new DistributedApplicationModel([resource]); + + var message = model.GetMissingPublishedRuntimeReferenceMessage(resource, "Docker Compose"); + + Assert.Equal("Resource 'frontend' is referenced by Docker Compose, but it does not publish a runtime. It is a build-only resource, and nothing consumes its published output. Remove the runtime reference, or wire its output into another resource with PublishWithContainerFiles(...).", message); + } + + [Fact] + public void MissingPublishedRuntimeMessage_ExplainsBuildOnlyResourcesUsedAsBuildArtifacts() + { + var source = new ContainerResource("frontend"); + source.Annotations.Add(new DockerfileBuildAnnotation(".", "Dockerfile", null) { HasEntrypoint = false }); + + var destination = new ContainerResource("gateway"); + destination.Annotations.Add(new ContainerFilesDestinationAnnotation + { + Source = source, + DestinationPath = "/app/public" + }); + + var model = new DistributedApplicationModel([source, destination]); + + var message = model.GetMissingPublishedRuntimeReferenceMessage(source, "Docker Compose"); + + Assert.Equal("Resource 'frontend' is referenced by Docker Compose, but it does not publish a runtime. It is a build-only resource. Remove the runtime reference and use it only as a build artifact.", message); + } +} From b30f681a426f17a9e4ccd80b34a9af7e159566e9 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 08:04:21 -0700 Subject: [PATCH 02/13] Update TypeScript playground to demonstrate un-awaited fluent chains Remove unnecessary awaits on Redis and Vite frontend chains to demonstrate that build() now flushes pending promises automatically. Await is only needed when the resolved resource is used elsewhere. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- playground/TypeScriptAppHost/apphost.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/playground/TypeScriptAppHost/apphost.ts b/playground/TypeScriptAppHost/apphost.ts index b169215d431..e5d5594659c 100644 --- a/playground/TypeScriptAppHost/apphost.ts +++ b/playground/TypeScriptAppHost/apphost.ts @@ -23,15 +23,14 @@ var dir = await builder.appHostDirectory.get(); console.log(`AppHost directory: ${dir}`); // Add PostgreSQL server and database +// Await here because we need the resolved resource to pass to withReference/waitFor const postgres = await builder.addPostgres("postgres"); const db = await postgres.addDatabase("db"); -const localCancellation = new AbortController(); -const dbUriExpression = await db.uriExpression.get(); -const _dbUri = await dbUriExpression.getValue(localCancellation.signal); console.log("Added PostgreSQL server with database 'db'"); // Add Express API that connects to PostgreSQL (uses npm run dev with tsx) +// Await here because we need the resolved 'api' resource to pass to other resources const api = await builder .addNodeApp("api", "./express-api", "src/server.ts") .withRunScript("dev") @@ -41,23 +40,22 @@ const api = await builder console.log("Added Express API with reference to PostgreSQL database"); -// Also keep Redis as an example of another service with persistent lifetime -const cache = await builder +// Redis — no await needed, we don't reference it elsewhere +builder .addRedis("cache") .withLifetime(ContainerLifetime.Persistent); console.log("Added Redis cache"); -// Add Vite frontend that connects to the API using the unified reference API -await builder +// Vite frontend — no await needed, build() flushes pending promises automatically. +// We can pass 'api' directly (already resolved) to withReference and waitFor. +builder .addViteApp("frontend", "./vite-frontend") .withReference(api) .waitFor(api) .withEnvironment("CUSTOM_ENV", "value") .withEnvironmentCallback(async (ctx: EnvironmentCallbackContext) => { - // Custom environment callback logic var ep = await api.getEndpoint("http"); - await ctx.environmentVariables.set("API_ENDPOINT", refExpr`${ep}`); }); From fd70c4addaa3b476305c65467176a34bba634f72 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 09:34:22 -0700 Subject: [PATCH 03/13] Remove unrelated files accidentally included Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- aspire.config.json | 8 - playground/TypeScriptAppHost/apphost.ts | 16 +- .../TypeScriptAppHost/aspire.config.json | 6 +- .../vite-frontend/package-lock.json | 7 +- .../AtsTypeScriptCodeGenerator.cs | 39 +- .../PublishedRuntimeReferenceDiagnostic.cs | 71 - .../Snapshots/AtsGeneratedAspire.verified.ts | 128 +- ...TwoPassScanningGeneratedAspire.verified.ts | 2272 +++++++++-------- ...ublishedRuntimeReferenceDiagnosticTests.cs | 53 - 9 files changed, 1247 insertions(+), 1353 deletions(-) delete mode 100644 aspire.config.json delete mode 100644 src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs delete mode 100644 tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs diff --git a/aspire.config.json b/aspire.config.json deleted file mode 100644 index 77e7e722128..00000000000 --- a/aspire.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "appHost": { - "path": "../Mongo.AppHost.csproj" - }, - "features": { - "dcpEnabled": true - } -} \ No newline at end of file diff --git a/playground/TypeScriptAppHost/apphost.ts b/playground/TypeScriptAppHost/apphost.ts index e5d5594659c..f7f8ba58517 100644 --- a/playground/TypeScriptAppHost/apphost.ts +++ b/playground/TypeScriptAppHost/apphost.ts @@ -23,15 +23,14 @@ var dir = await builder.appHostDirectory.get(); console.log(`AppHost directory: ${dir}`); // Add PostgreSQL server and database -// Await here because we need the resolved resource to pass to withReference/waitFor -const postgres = await builder.addPostgres("postgres"); -const db = await postgres.addDatabase("db"); +const postgres = builder.addPostgres("postgres"); +const db = postgres.addDatabase("db"); console.log("Added PostgreSQL server with database 'db'"); // Add Express API that connects to PostgreSQL (uses npm run dev with tsx) -// Await here because we need the resolved 'api' resource to pass to other resources -const api = await builder +// No await needed — withReference/waitFor accept promises directly +const api = builder .addNodeApp("api", "./express-api", "src/server.ts") .withRunScript("dev") .withHttpEndpoint({ env: "PORT" }) @@ -40,25 +39,26 @@ const api = await builder console.log("Added Express API with reference to PostgreSQL database"); -// Redis — no await needed, we don't reference it elsewhere +// Redis builder .addRedis("cache") .withLifetime(ContainerLifetime.Persistent); console.log("Added Redis cache"); -// Vite frontend — no await needed, build() flushes pending promises automatically. -// We can pass 'api' directly (already resolved) to withReference and waitFor. +// Vite frontend — withReference/waitFor accept the un-awaited 'api' promise builder .addViteApp("frontend", "./vite-frontend") .withReference(api) .waitFor(api) .withEnvironment("CUSTOM_ENV", "value") .withEnvironmentCallback(async (ctx: EnvironmentCallbackContext) => { + // await needed here because getEndpoint returns a value we use var ep = await api.getEndpoint("http"); await ctx.environmentVariables.set("API_ENDPOINT", refExpr`${ep}`); }); console.log("Added Vite frontend with reference to API"); +// build() flushes all pending promises before running await builder.build().run(); diff --git a/playground/TypeScriptAppHost/aspire.config.json b/playground/TypeScriptAppHost/aspire.config.json index a67304c6ba0..d04d0c45c39 100644 --- a/playground/TypeScriptAppHost/aspire.config.json +++ b/playground/TypeScriptAppHost/aspire.config.json @@ -3,10 +3,14 @@ "path": "apphost.ts", "language": "typescript/nodejs" }, + "sdk": { + "version": "13.3.0-dev" + }, + "channel": "daily", "packages": { "Aspire.Hosting.PostgreSQL": "", "Aspire.Hosting.Redis": "", "Aspire.Hosting.JavaScript": "", "Aspire.Hosting.Docker": "" } -} +} \ No newline at end of file diff --git a/playground/TypeScriptAppHost/vite-frontend/package-lock.json b/playground/TypeScriptAppHost/vite-frontend/package-lock.json index 6ad728ba0ea..d356be30a7f 100644 --- a/playground/TypeScriptAppHost/vite-frontend/package-lock.json +++ b/playground/TypeScriptAppHost/vite-frontend/package-lock.json @@ -17,6 +17,9 @@ "@vitejs/plugin-react": "^6.0.0", "typescript": "^5.7.0", "vite": "^8.0.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" } }, "node_modules/@emnapi/core": { @@ -369,7 +372,6 @@ "integrity": "sha512-3MbSL37jEchWZz2p2mjntRZtPt837ij10ApxKfgmXCTuHWagYg7iA5bqPw6C8BMPfwidlvfPI/fxOc42HLhcyg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "csstype": "^3.2.2" } @@ -753,7 +755,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -795,7 +796,6 @@ "resolved": "https://registry.npmjs.org/react/-/react-19.2.3.tgz", "integrity": "sha512-Ku/hhYbVjOQnXDZFv2+RibmLFGwFdeeKHFcOTlrt7xplBnya5OGn/hIRDsqDiSUcfORsDC7MPxwork8jBwsIWA==", "license": "MIT", - "peer": true, "engines": { "node": ">=0.10.0" } @@ -914,7 +914,6 @@ "integrity": "sha512-fPGaRNj9Zytaf8LEiBhY7Z6ijnFKdzU/+mL8EFBaKr7Vw1/FWcTBAMW0wLPJAGMPX38ZPVCVgLceWiEqeoqL2Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@oxc-project/runtime": "0.115.0", "lightningcss": "^1.32.0", diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index f4128a9af40..2100cc7a887 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -453,11 +453,6 @@ private static string GetRpcArgumentValueExpression(string parameterName, AtsTyp return $"CancellationToken.fromValue({parameterName})"; } - if (IsHandleOrHandleUnionType(typeRef)) - { - return $"{parameterName}_resolved"; - } - return parameterName; } @@ -1453,7 +1448,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" const {param.Name} = options?.{param.Name};"); + WriteLine($" let {param.Name} = options?.{param.Name};"); } // Handle callback registration if any @@ -1507,7 +1502,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab GeneratePromiseResolution(capability.Parameters); // Flush pending promises before build to ensure all un-awaited chains complete - if (capability.MethodName == "Build") + if (string.Equals(capability.MethodName, "build", StringComparison.OrdinalIgnoreCase)) { WriteLine(" await this._client.flushPendingPromises();"); } @@ -1546,7 +1541,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Extract optional params from options object and forward to internal method foreach (var param in optionalParams) { - WriteLine($" const {param.Name} = options?.{param.Name};"); + WriteLine($" let {param.Name} = options?.{param.Name};"); } // Forward all params to internal method @@ -1572,7 +1567,7 @@ private void GeneratePromiseResolution(IReadOnlyList parameter if (IsHandleOrHandleUnionType(param.Type)) { - WriteLine($" const {param.Name}_resolved = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); + WriteLine($" {param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); } } } @@ -1813,7 +1808,7 @@ private void GenerateEntryPointFunction(AtsCapabilityInfo capability) WriteLine($" '{capability.CapabilityId}',"); WriteLine(" rpcArgs"); WriteLine($" ).then(handle => new {returnWrapperImplementationClass}(handle, client));"); - WriteLine($" return new {returnPromiseImplementationClass}(promise);"); + WriteLine($" return new {returnPromiseImplementationClass}(promise, client);"); WriteLine("}"); } else @@ -2370,6 +2365,10 @@ private void GeneratePropertyLikeObject(string propertyName, AtsCapabilityInfo? { var valueType = MapInputTypeToTypeScript(valueParam.Type); WriteLine($" set: async (value: {valueType}): Promise => {{"); + if (IsHandleOrHandleUnionType(valueParam.Type)) + { + WriteLine($" value = isPromiseLike(value) ? await value : value;"); + } WriteLine($" await this._client.invokeCapability("); WriteLine($" '{setter.CapabilityId}',"); WriteLine($" {{ context: this._handle, {GetRpcArgumentEntry("value", valueParam.Type)} }}"); @@ -2411,6 +2410,10 @@ private void GenerateWrapperPropertyObject(string propertyName, AtsCapabilityInf { var valueType = MapInputTypeToTypeScript(valueParam.Type); WriteLine($" set: async (value: {valueType}): Promise => {{"); + if (IsHandleOrHandleUnionType(valueParam.Type)) + { + WriteLine($" value = isPromiseLike(value) ? await value : value;"); + } WriteLine($" await this._client.invokeCapability("); WriteLine($" '{setter.CapabilityId}',"); WriteLine($" {{ context: this._handle, {GetRpcArgumentEntry("value", valueParam.Type)} }}"); @@ -2570,9 +2573,12 @@ private void GenerateContextMethod(AtsCapabilityInfo method) // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" const {param.Name} = options?.{param.Name};"); + WriteLine($" let {param.Name} = options?.{param.Name};"); } + // Resolve any promise-like handle parameters + GeneratePromiseResolution(userParams); + // Build args object with conditional inclusion var requiredArgs = new List { $"{targetParamName}: this._handle" }; foreach (var param in requiredParams) @@ -2656,9 +2662,12 @@ private void GenerateWrapperMethod(AtsCapabilityInfo capability) // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" const {param.Name} = options?.{param.Name};"); + WriteLine($" let {param.Name} = options?.{param.Name};"); } + // Resolve any promise-like handle parameters + GeneratePromiseResolution(userParams); + // Build args object with conditional inclusion var requiredArgs = new List { $"{firstParamName}: this._handle" }; foreach (var param in requiredParams) @@ -2787,7 +2796,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params and forward foreach (var param in optionalParams) { - WriteLine($" const {param.Name} = options?.{param.Name};"); + WriteLine($" let {param.Name} = options?.{param.Name};"); } Write($" return new {returnPromiseImplementationClass}(this.{internalMethodName}("); @@ -2833,7 +2842,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params and forward foreach (var param in optionalParams) { - WriteLine($" const {param.Name} = options?.{param.Name};"); + WriteLine($" let {param.Name} = options?.{param.Name};"); } Write($" return new {promiseImplementationClass}(this.{internalMethodName}("); @@ -2851,7 +2860,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" const {param.Name} = options?.{param.Name};"); + WriteLine($" let {param.Name} = options?.{param.Name};"); } // Handle callback registration if any diff --git a/src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs b/src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs deleted file mode 100644 index 1aeb17945fb..00000000000 --- a/src/Aspire.Hosting/ApplicationModel/PublishedRuntimeReferenceDiagnostic.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Aspire.Hosting.ApplicationModel; - -/// -/// Provides diagnostics for references that require a published runtime which was not generated. -/// -public static class PublishedRuntimeReferenceDiagnostic -{ - /// - /// Creates an actionable error message for a resource reference that could not be resolved for the specified publish target. - /// - /// The distributed application model. - /// The referenced resource that could not be resolved. - /// The publish target name to include in the message. - /// An actionable error message. - /// - /// There are a few common reasons why a resource reference can be missing at publish time: - /// - /// - /// The resource was explicitly excluded from publish. In that case, the reference should be marked optional if the exclusion is intentional. - /// - /// - /// The resource is build-only and does not publish a runtime. In that case, runtime references should be removed and the resource should only be used as a build artifact. - /// - /// - /// The resource is build-only and nothing consumes its published output. In that case, either remove the runtime reference or wire the output into another resource with PublishWithContainerFiles(...). - /// - /// - /// Any remaining cases fall back to a generic "not published to this target" message. - /// - public static string GetMissingPublishedRuntimeReferenceMessage(this DistributedApplicationModel model, IResource referencedResource, string publisherName) - { - ArgumentNullException.ThrowIfNull(model); - ArgumentNullException.ThrowIfNull(referencedResource); - ArgumentException.ThrowIfNullOrEmpty(publisherName); - - if (referencedResource.IsExcludedFromPublish()) - { - return $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but it was excluded from publish. If that exclusion is intentional, mark the reference optional."; - } - - if (referencedResource.IsBuildOnlyContainer()) - { - return HasContainerFilesConsumer(model, referencedResource) - ? $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but it does not publish a runtime. It is a build-only resource. Remove the runtime reference and use it only as a build artifact." - : $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but it does not publish a runtime. It is a build-only resource, and nothing consumes its published output. Remove the runtime reference, or wire its output into another resource with PublishWithContainerFiles(...)."; - } - - return $"Resource '{referencedResource.Name}' is referenced by {publisherName}, but no published runtime was generated for it in that environment. Ensure the resource is published to the same target, or remove the runtime reference."; - } - - private static bool HasContainerFilesConsumer(DistributedApplicationModel model, IResource referencedResource) - { - foreach (var resource in model.Resources) - { - if (!resource.TryGetAnnotationsOfType(out var destinations)) - { - continue; - } - - if (destinations.Any(destination => destination.Source == referencedResource)) - { - return true; - } - } - - return false; - } -} diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts index 3db0ebbb960..d94677aecd3 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts @@ -562,7 +562,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { - const port = options?.port; + let port = options?.port; return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port), this._client); } @@ -694,8 +694,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -869,8 +869,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -885,8 +885,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -961,7 +961,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { - const databaseName = options?.databaseName; + let databaseName = options?.databaseName; return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName), this._client); } @@ -1361,7 +1361,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { - const mode = options?.mode; + let mode = options?.mode; return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode), this._client); } @@ -1379,8 +1379,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -1419,8 +1419,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionStringInternal(connectionString: ReferenceExpression): Promise { - const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; - const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; + connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -1516,7 +1516,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -1572,8 +1572,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -1627,8 +1627,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -1643,8 +1643,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -1689,7 +1689,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Gets the status of the resource asynchronously */ async getStatusAsync(options?: GetStatusAsyncOptions): Promise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -1719,7 +1719,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Waits for the resource to be ready */ async waitForReadyAsync(timeout: number, options?: WaitForReadyAsyncOptions): Promise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle, timeout }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -1764,8 +1764,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a data volume with persistence */ withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { - const name = options?.name; - const isReadOnly = options?.isReadOnly; + let name = options?.name; + let isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly), this._client); } @@ -1843,8 +1843,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -1862,8 +1862,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -2182,8 +2182,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -2285,7 +2285,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -2341,8 +2341,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -2357,8 +2357,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -2373,8 +2373,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -2525,8 +2525,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -2544,8 +2544,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -2803,8 +2803,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -2886,7 +2886,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -2942,8 +2942,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -2958,8 +2958,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -2974,8 +2974,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -3096,8 +3096,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -3115,8 +3115,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -3307,8 +3307,8 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; - const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; + connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts index ff653c634c8..5b1a71fe358 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts @@ -937,9 +937,10 @@ class CommandLineArgsCallbackContextImpl implements CommandLineArgsCallbackConte return new DistributedApplicationExecutionContextImpl(handle, this._client); }, set: async (value: DistributedApplicationExecutionContext | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/CommandLineArgsCallbackContext.setExecutionContext', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -954,9 +955,10 @@ class CommandLineArgsCallbackContextImpl implements CommandLineArgsCallbackConte return new LoggerImpl(handle, this._client); }, set: async (value: Logger | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/CommandLineArgsCallbackContext.setLogger', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -1064,7 +1066,7 @@ class DistributedApplicationImpl implements DistributedApplication { } run(options?: RunOptions): DistributedApplicationPromise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; return new DistributedApplicationPromiseImpl(this._runInternal(cancellationToken), this._client); } @@ -1489,7 +1491,7 @@ class EndpointReferenceImpl implements EndpointReference { /** Gets the URL of the endpoint asynchronously */ async getValueAsync(options?: GetValueAsyncOptions): Promise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; const rpcArgs: Record = { context: this._handle }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -1500,9 +1502,9 @@ class EndpointReferenceImpl implements EndpointReference { /** Gets a conditional expression that resolves to the enabledValue when TLS is enabled on the endpoint, or to the disabledValue otherwise. */ async getTlsValue(enabledValue: ReferenceExpression, disabledValue: ReferenceExpression): Promise { - const enabledValue_resolved = isPromiseLike(enabledValue) ? await enabledValue : enabledValue; - const disabledValue_resolved = isPromiseLike(disabledValue) ? await disabledValue : disabledValue; - const rpcArgs: Record = { context: this._handle, enabledValue: enabledValue_resolved, disabledValue: disabledValue_resolved }; + enabledValue = isPromiseLike(enabledValue) ? await enabledValue : enabledValue; + disabledValue = isPromiseLike(disabledValue) ? await disabledValue : disabledValue; + const rpcArgs: Record = { context: this._handle, enabledValue, disabledValue }; return await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/EndpointReference.getTlsValue', rpcArgs @@ -1671,9 +1673,10 @@ class EnvironmentCallbackContextImpl implements EnvironmentCallbackContext { return new LoggerImpl(handle, this._client); }, set: async (value: Logger | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/EnvironmentCallbackContext.setLogger', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -1749,9 +1752,10 @@ class ExecuteCommandContextImpl implements ExecuteCommandContext { return new ServiceProviderImpl(handle, this._client); }, set: async (value: ServiceProvider | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ExecuteCommandContext.setServiceProvider', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -1799,9 +1803,10 @@ class ExecuteCommandContextImpl implements ExecuteCommandContext { return new LoggerImpl(handle, this._client); }, set: async (value: Logger | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ExecuteCommandContext.setLogger', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -1949,9 +1954,10 @@ class PipelineConfigurationContextImpl implements PipelineConfigurationContext { return new ServiceProviderImpl(handle, this._client); }, set: async (value: ServiceProvider | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineConfigurationContext.setServices', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -1982,9 +1988,10 @@ class PipelineConfigurationContextImpl implements PipelineConfigurationContext { return new DistributedApplicationModelImpl(handle, this._client); }, set: async (value: DistributedApplicationModel | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineConfigurationContext.setModel', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -2263,9 +2270,10 @@ class PipelineStepImpl implements PipelineStep { return new ResourceImpl(handle, this._client); }, set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStep.setResource', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -2386,9 +2394,10 @@ class PipelineStepContextImpl implements PipelineStepContext { return new PipelineContextImpl(handle, this._client); }, set: async (value: PipelineContext | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepContext.setPipelineContext', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -2403,9 +2412,10 @@ class PipelineStepContextImpl implements PipelineStepContext { return new ReportingStepImpl(handle, this._client); }, set: async (value: ReportingStep | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepContext.setReportingStep', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -2517,9 +2527,10 @@ class PipelineStepFactoryContextImpl implements PipelineStepFactoryContext { return new PipelineContextImpl(handle, this._client); }, set: async (value: PipelineContext | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepFactoryContext.setPipelineContext', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -2534,9 +2545,10 @@ class PipelineStepFactoryContextImpl implements PipelineStepFactoryContext { return new ResourceImpl(handle, this._client); }, set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepFactoryContext.setResource', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -2786,7 +2798,7 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { } appendFormatted(value: string, options?: AppendFormattedOptions): ReferenceExpressionBuilderPromise { - const format = options?.format; + let format = options?.format; return new ReferenceExpressionBuilderPromiseImpl(this._appendFormattedInternal(value, format), this._client); } @@ -2803,7 +2815,7 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { } appendValueProvider(valueProvider: any, options?: AppendValueProviderOptions): ReferenceExpressionBuilderPromise { - const format = options?.format; + let format = options?.format; return new ReferenceExpressionBuilderPromiseImpl(this._appendValueProviderInternal(valueProvider, format), this._client); } @@ -2937,8 +2949,8 @@ class ResourceLoggerServiceImpl implements ResourceLoggerService { /** Completes the log stream for a resource */ /** @internal */ async _completeLogInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { loggerService: this._handle, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { loggerService: this._handle, resource }; await this._client.invokeCapability( 'Aspire.Hosting/completeLog', rpcArgs @@ -3043,7 +3055,7 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { } waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise { - const targetState = options?.targetState; + let targetState = options?.targetState; return new ResourceNotificationServicePromiseImpl(this._waitForResourceStateInternal(resourceName, targetState), this._client); } @@ -3068,8 +3080,8 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { /** Waits for all dependencies of a resource to be ready */ /** @internal */ async _waitForDependenciesInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { notificationService: this._handle, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { notificationService: this._handle, resource }; await this._client.invokeCapability( 'Aspire.Hosting/waitForDependencies', rpcArgs @@ -3093,8 +3105,8 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { /** Publishes an update for a resource's state */ /** @internal */ async _publishResourceUpdateInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, state?: string, stateStyle?: string): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { notificationService: this._handle, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { notificationService: this._handle, resource }; if (state !== undefined) rpcArgs.state = state; if (stateStyle !== undefined) rpcArgs.stateStyle = stateStyle; await this._client.invokeCapability( @@ -3105,8 +3117,8 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { } publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { - const state = options?.state; - const stateStyle = options?.stateStyle; + let state = options?.state; + let stateStyle = options?.stateStyle; return new ResourceNotificationServicePromiseImpl(this._publishResourceUpdateInternal(resource, state, stateStyle), this._client); } @@ -3342,9 +3354,10 @@ class ResourceUrlsCallbackContextImpl implements ResourceUrlsCallbackContext { return new LoggerImpl(handle, this._client); }, set: async (value: Logger | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ResourceUrlsCallbackContext.setLogger', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -3754,9 +3767,10 @@ class UpdateCommandStateContextImpl implements UpdateCommandStateContext { return new ServiceProviderImpl(handle, this._client); }, set: async (value: ServiceProvider | PromiseLike): Promise => { + value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/UpdateCommandStateContext.setServiceProvider', - { context: this._handle, value: value_resolved } + { context: this._handle, value } ); } }; @@ -4047,8 +4061,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder /** Adds a connection string with a reference expression */ /** @internal */ async _addConnectionStringExpressionInternal(name: string, connectionStringExpression: ReferenceExpression): Promise { - const connectionStringExpression_resolved = isPromiseLike(connectionStringExpression) ? await connectionStringExpression : connectionStringExpression; - const rpcArgs: Record = { builder: this._handle, name, connectionStringExpression: connectionStringExpression_resolved }; + connectionStringExpression = isPromiseLike(connectionStringExpression) ? await connectionStringExpression : connectionStringExpression; + const rpcArgs: Record = { builder: this._handle, name, connectionStringExpression }; const result = await this._client.invokeCapability( 'Aspire.Hosting/addConnectionStringExpression', rpcArgs @@ -4083,10 +4097,10 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder /** Adds a container registry resource */ /** @internal */ async _addContainerRegistryInternal(name: string, endpoint: ParameterResource | PromiseLike, repository?: ParameterResource | PromiseLike): Promise { - const endpoint_resolved = isPromiseLike(endpoint) ? await endpoint : endpoint; - const repository_resolved = isPromiseLike(repository) ? await repository : repository; - const rpcArgs: Record = { builder: this._handle, name, endpoint: endpoint_resolved }; - if (repository !== undefined) rpcArgs.repository = repository_resolved; + endpoint = isPromiseLike(endpoint) ? await endpoint : endpoint; + repository = isPromiseLike(repository) ? await repository : repository; + const rpcArgs: Record = { builder: this._handle, name, endpoint }; + if (repository !== undefined) rpcArgs.repository = repository; const result = await this._client.invokeCapability( 'Aspire.Hosting/addContainerRegistry', rpcArgs @@ -4095,7 +4109,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { - const repository = options?.repository; + let repository = options?.repository; return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryInternal(name, endpoint, repository), this._client); } @@ -4112,7 +4126,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise { - const repository = options?.repository; + let repository = options?.repository; return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryFromStringInternal(name, endpoint, repository), this._client); } @@ -4145,8 +4159,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise { - const dockerfilePath = options?.dockerfilePath; - const stage = options?.stage; + let dockerfilePath = options?.dockerfilePath; + let stage = options?.stage; return new ContainerResourcePromiseImpl(this._addDockerfileInternal(name, contextPath, dockerfilePath, stage), this._client); } @@ -4213,8 +4227,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder /** Adds an external service with a parameter URL */ /** @internal */ async _addExternalServiceParameterInternal(name: string, urlParameter: ParameterResource | PromiseLike): Promise { - const urlParameter_resolved = isPromiseLike(urlParameter) ? await urlParameter : urlParameter; - const rpcArgs: Record = { builder: this._handle, name, urlParameter: urlParameter_resolved }; + urlParameter = isPromiseLike(urlParameter) ? await urlParameter : urlParameter; + const rpcArgs: Record = { builder: this._handle, name, urlParameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/addExternalServiceParameter', rpcArgs @@ -4239,7 +4253,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise { - const secret = options?.secret; + let secret = options?.secret; return new ParameterResourcePromiseImpl(this._addParameterInternal(name, secret), this._client); } @@ -4257,8 +4271,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise { - const publishValueAsDefault = options?.publishValueAsDefault; - const secret = options?.secret; + let publishValueAsDefault = options?.publishValueAsDefault; + let secret = options?.secret; return new ParameterResourcePromiseImpl(this._addParameterWithValueInternal(name, value, publishValueAsDefault, secret), this._client); } @@ -4275,7 +4289,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise { - const secret = options?.secret; + let secret = options?.secret; return new ParameterResourcePromiseImpl(this._addParameterFromConfigurationInternal(name, configurationKey, secret), this._client); } @@ -4292,7 +4306,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addConnectionString(name: string, options?: AddConnectionStringOptions): ResourceWithConnectionStringPromise { - const environmentVariableName = options?.environmentVariableName; + let environmentVariableName = options?.environmentVariableName; return new ResourceWithConnectionStringPromiseImpl(this._addConnectionStringInternal(name, environmentVariableName), this._client); } @@ -4422,7 +4436,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { - const port = options?.port; + let port = options?.port; return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port), this._client); } @@ -4614,8 +4628,8 @@ class DistributedApplicationEventingImpl implements DistributedApplicationEventi /** Invokes the Unsubscribe method */ /** @internal */ async _unsubscribeInternal(subscription: DistributedApplicationEventSubscriptionHandle): Promise { - const subscription_resolved = isPromiseLike(subscription) ? await subscription : subscription; - const rpcArgs: Record = { context: this._handle, subscription: subscription_resolved }; + subscription = isPromiseLike(subscription) ? await subscription : subscription; + const rpcArgs: Record = { context: this._handle, subscription }; await this._client.invokeCapability( 'Aspire.Hosting.Eventing/IDistributedApplicationEventing.unsubscribe', rpcArgs @@ -5025,7 +5039,7 @@ class ReportingStepImpl implements ReportingStep { } createTask(statusText: string, options?: CreateTaskOptions): ReportingTaskPromise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._createTaskInternal(statusText, cancellationToken), this._client); } @@ -5042,7 +5056,7 @@ class ReportingStepImpl implements ReportingStep { } createMarkdownTask(markdownString: string, options?: CreateMarkdownTaskOptions): ReportingTaskPromise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._createMarkdownTaskInternal(markdownString, cancellationToken), this._client); } @@ -5090,8 +5104,8 @@ class ReportingStepImpl implements ReportingStep { } completeStep(completionText: string, options?: CompleteStepOptions): ReportingStepPromise { - const completionState = options?.completionState; - const cancellationToken = options?.cancellationToken; + let completionState = options?.completionState; + let cancellationToken = options?.cancellationToken; return new ReportingStepPromiseImpl(this._completeStepInternal(completionText, completionState, cancellationToken), this._client); } @@ -5109,8 +5123,8 @@ class ReportingStepImpl implements ReportingStep { } completeStepMarkdown(markdownString: string, options?: CompleteStepMarkdownOptions): ReportingStepPromise { - const completionState = options?.completionState; - const cancellationToken = options?.cancellationToken; + let completionState = options?.completionState; + let cancellationToken = options?.cancellationToken; return new ReportingStepPromiseImpl(this._completeStepMarkdownInternal(markdownString, completionState, cancellationToken), this._client); } @@ -5208,7 +5222,7 @@ class ReportingTaskImpl implements ReportingTask { } updateTask(statusText: string, options?: UpdateTaskOptions): ReportingTaskPromise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._updateTaskInternal(statusText, cancellationToken), this._client); } @@ -5225,7 +5239,7 @@ class ReportingTaskImpl implements ReportingTask { } updateTaskMarkdown(markdownString: string, options?: UpdateTaskMarkdownOptions): ReportingTaskPromise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._updateTaskMarkdownInternal(markdownString, cancellationToken), this._client); } @@ -5244,9 +5258,9 @@ class ReportingTaskImpl implements ReportingTask { } completeTask(options?: CompleteTaskOptions): ReportingTaskPromise { - const completionMessage = options?.completionMessage; - const completionState = options?.completionState; - const cancellationToken = options?.cancellationToken; + let completionMessage = options?.completionMessage; + let completionState = options?.completionState; + let cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._completeTaskInternal(completionMessage, completionState, cancellationToken), this._client); } @@ -5264,8 +5278,8 @@ class ReportingTaskImpl implements ReportingTask { } completeTaskMarkdown(markdownString: string, options?: CompleteTaskMarkdownOptions): ReportingTaskPromise { - const completionState = options?.completionState; - const cancellationToken = options?.cancellationToken; + let completionState = options?.completionState; + let cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._completeTaskMarkdownInternal(markdownString, completionState, cancellationToken), this._client); } @@ -5561,15 +5575,15 @@ class UserSecretsManagerImpl implements UserSecretsManager { } saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; return new UserSecretsManagerPromiseImpl(this._saveStateJsonInternal(json, cancellationToken), this._client); } /** Gets a secret value if it exists, or sets it to the provided value if it does not */ /** @internal */ async _getOrSetSecretInternal(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): Promise { - const resourceBuilder_resolved = isPromiseLike(resourceBuilder) ? await resourceBuilder : resourceBuilder; - const rpcArgs: Record = { userSecretsManager: this._handle, resourceBuilder: resourceBuilder_resolved, name, value }; + resourceBuilder = isPromiseLike(resourceBuilder) ? await resourceBuilder : resourceBuilder; + const rpcArgs: Record = { userSecretsManager: this._handle, resourceBuilder, name, value }; await this._client.invokeCapability( 'Aspire.Hosting/getOrSetSecret', rpcArgs @@ -5747,8 +5761,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -5775,8 +5789,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', rpcArgs @@ -5870,14 +5884,14 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -5888,7 +5902,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -5944,8 +5958,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -5960,8 +5974,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -5976,8 +5990,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -6007,8 +6021,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -6019,7 +6033,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new ConnectionStringResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -6056,14 +6070,14 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ConnectionStringResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ConnectionStringResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -6078,8 +6092,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -6105,7 +6119,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ConnectionStringResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ConnectionStringResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -6295,8 +6309,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; - const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; + connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -6394,7 +6408,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -6481,8 +6495,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -6497,8 +6511,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -6619,8 +6633,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -7107,8 +7121,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -7180,7 +7194,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ContainerRegistryResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -7288,8 +7302,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -7315,7 +7329,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ContainerRegistryResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ContainerRegistryResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -7485,8 +7499,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -7640,8 +7654,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -7656,8 +7670,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -7778,8 +7792,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase /** @internal */ private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -8322,7 +8336,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise { - const isReadOnly = options?.isReadOnly; + let isReadOnly = options?.isReadOnly; return new ContainerResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } @@ -8384,7 +8398,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): ContainerResourcePromise { - const tag = options?.tag; + let tag = options?.tag; return new ContainerResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } @@ -8477,8 +8491,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise { - const dockerfilePath = options?.dockerfilePath; - const stage = options?.stage; + let dockerfilePath = options?.dockerfilePath; + let stage = options?.stage; return new ContainerResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } @@ -8499,8 +8513,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -8515,8 +8529,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -8558,8 +8572,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise { - const buildImage = options?.buildImage; - const runtimeImage = options?.runtimeImage; + let buildImage = options?.buildImage; + let runtimeImage = options?.runtimeImage; return new ContainerResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -8592,8 +8606,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ContainerResourcePromise { - const path = options?.path; - const endpointName = options?.endpointName; + let path = options?.path; + let endpointName = options?.endpointName; return new ContainerResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -8655,14 +8669,14 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise { - const helpLink = options?.helpLink; + let helpLink = options?.helpLink; return new ContainerResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -8677,8 +8691,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -8716,8 +8730,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -8735,8 +8749,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -8754,8 +8768,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -8808,8 +8822,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -8822,9 +8836,9 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new ContainerResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -8845,8 +8859,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -8861,8 +8875,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -8895,14 +8909,14 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ContainerResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const scheme = options?.scheme; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; - const isExternal = options?.isExternal; - const protocol = options?.protocol; + let port = options?.port; + let targetPort = options?.targetPort; + let scheme = options?.scheme; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; + let isExternal = options?.isExternal; + let protocol = options?.protocol; return new ContainerResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -8923,11 +8937,11 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ContainerResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new ContainerResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -8948,11 +8962,11 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ContainerResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new ContainerResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -9028,14 +9042,14 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ContainerResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ContainerResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -9046,7 +9060,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ContainerResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ContainerResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -9106,8 +9120,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -9122,8 +9136,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -9138,8 +9152,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -9154,8 +9168,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -9185,8 +9199,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -9197,7 +9211,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new ContainerResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -9231,9 +9245,9 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ContainerResourcePromise { - const path = options?.path; - const statusCode = options?.statusCode; - const endpointName = options?.endpointName; + let path = options?.path; + let statusCode = options?.statusCode; + let endpointName = options?.endpointName; return new ContainerResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -9255,7 +9269,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ContainerResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -9291,9 +9305,9 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -9303,7 +9317,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ContainerResourcePromise { - const password = options?.password; + let password = options?.password; return new ContainerResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } @@ -9324,8 +9338,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -9340,8 +9354,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -9367,7 +9381,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise { - const iconVariant = options?.iconVariant; + let iconVariant = options?.iconVariant; return new ContainerResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -9390,13 +9404,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ContainerResourcePromise { - const path = options?.path; - const initialDelaySeconds = options?.initialDelaySeconds; - const periodSeconds = options?.periodSeconds; - const timeoutSeconds = options?.timeoutSeconds; - const failureThreshold = options?.failureThreshold; - const successThreshold = options?.successThreshold; - const endpointName = options?.endpointName; + let path = options?.path; + let initialDelaySeconds = options?.initialDelaySeconds; + let periodSeconds = options?.periodSeconds; + let timeoutSeconds = options?.timeoutSeconds; + let failureThreshold = options?.failureThreshold; + let successThreshold = options?.successThreshold; + let endpointName = options?.endpointName; return new ContainerResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -9466,10 +9480,10 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ContainerResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -9507,8 +9521,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): ContainerResourcePromise { - const name = options?.name; - const isReadOnly = options?.isReadOnly; + let name = options?.name; + let isReadOnly = options?.isReadOnly; return new ContainerResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } @@ -9635,8 +9649,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ContainerResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new ContainerResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -9738,7 +9752,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ContainerResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new ContainerResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -9794,8 +9808,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -9810,8 +9824,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -9826,8 +9840,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -9963,8 +9977,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ContainerResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ContainerResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -9982,8 +9996,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ContainerResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ContainerResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -10744,8 +10758,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -10772,8 +10786,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise { - const buildImage = options?.buildImage; - const runtimeImage = options?.runtimeImage; + let buildImage = options?.buildImage; + let runtimeImage = options?.runtimeImage; return new CSharpAppResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -10791,8 +10805,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise { - const path = options?.path; - const endpointName = options?.endpointName; + let path = options?.path; + let endpointName = options?.endpointName; return new CSharpAppResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -10874,7 +10888,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise { - const configure = options?.configure; + let configure = options?.configure; return new CSharpAppResourcePromiseImpl(this._publishAsDockerFileInternal(configure), this._client); } @@ -10891,14 +10905,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise { - const helpLink = options?.helpLink; + let helpLink = options?.helpLink; return new CSharpAppResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -10913,8 +10927,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -10952,8 +10966,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -10971,8 +10985,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -10990,8 +11004,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -11044,8 +11058,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -11058,9 +11072,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new CSharpAppResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -11081,8 +11095,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -11097,8 +11111,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -11131,14 +11145,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): CSharpAppResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const scheme = options?.scheme; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; - const isExternal = options?.isExternal; - const protocol = options?.protocol; + let port = options?.port; + let targetPort = options?.targetPort; + let scheme = options?.scheme; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; + let isExternal = options?.isExternal; + let protocol = options?.protocol; return new CSharpAppResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -11159,11 +11173,11 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): CSharpAppResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new CSharpAppResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -11184,11 +11198,11 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): CSharpAppResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new CSharpAppResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -11264,14 +11278,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): CSharpAppResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new CSharpAppResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -11282,7 +11296,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new CSharpAppResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -11327,8 +11341,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved, destinationPath }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source, destinationPath }; const result = await this._client.invokeCapability( 'Aspire.Hosting/publishWithContainerFilesFromResource', rpcArgs @@ -11358,8 +11372,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -11374,8 +11388,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -11390,8 +11404,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -11406,8 +11420,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -11437,8 +11451,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -11449,7 +11463,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new CSharpAppResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -11483,9 +11497,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): CSharpAppResourcePromise { - const path = options?.path; - const statusCode = options?.statusCode; - const endpointName = options?.endpointName; + let path = options?.path; + let statusCode = options?.statusCode; + let endpointName = options?.endpointName; return new CSharpAppResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -11507,7 +11521,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new CSharpAppResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -11543,9 +11557,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -11555,7 +11569,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): CSharpAppResourcePromise { - const password = options?.password; + let password = options?.password; return new CSharpAppResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } @@ -11576,8 +11590,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -11592,8 +11606,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -11619,7 +11633,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise { - const iconVariant = options?.iconVariant; + let iconVariant = options?.iconVariant; return new CSharpAppResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -11642,13 +11656,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): CSharpAppResourcePromise { - const path = options?.path; - const initialDelaySeconds = options?.initialDelaySeconds; - const periodSeconds = options?.periodSeconds; - const timeoutSeconds = options?.timeoutSeconds; - const failureThreshold = options?.failureThreshold; - const successThreshold = options?.successThreshold; - const endpointName = options?.endpointName; + let path = options?.path; + let initialDelaySeconds = options?.initialDelaySeconds; + let periodSeconds = options?.periodSeconds; + let timeoutSeconds = options?.timeoutSeconds; + let failureThreshold = options?.failureThreshold; + let successThreshold = options?.successThreshold; + let endpointName = options?.endpointName; return new CSharpAppResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -11718,10 +11732,10 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): CSharpAppResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new CSharpAppResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -11868,8 +11882,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): CSharpAppResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new CSharpAppResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -11971,7 +11985,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): CSharpAppResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new CSharpAppResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -12027,8 +12041,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -12043,8 +12057,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -12059,8 +12073,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -12196,8 +12210,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): CSharpAppResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new CSharpAppResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -12215,8 +12229,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): CSharpAppResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new CSharpAppResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -12919,8 +12933,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -12947,8 +12961,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -13191,8 +13205,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -13230,8 +13244,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -13249,8 +13263,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -13268,8 +13282,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -13322,8 +13336,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -13336,9 +13350,9 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): DotnetToolResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new DotnetToolResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -13359,8 +13373,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -13375,8 +13389,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -13409,14 +13423,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -13560,7 +13574,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -13636,8 +13650,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -13652,8 +13666,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -13668,8 +13682,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -13699,8 +13713,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -13711,7 +13725,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): DotnetToolResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new DotnetToolResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -13745,9 +13759,9 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): DotnetToolResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new DotnetToolResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -13805,9 +13819,9 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -13817,7 +13831,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -13854,8 +13868,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -13881,7 +13895,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): DotnetToolResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new DotnetToolResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -14130,8 +14144,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -14305,8 +14319,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -14321,8 +14335,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -14458,8 +14472,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -15227,8 +15241,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -15381,8 +15395,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -15420,8 +15434,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -15439,8 +15453,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -15458,8 +15472,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -15512,8 +15526,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -15526,9 +15540,9 @@ class ExecutableResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ExecutableResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new ExecutableResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -15549,8 +15563,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -15565,8 +15579,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -15599,14 +15613,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -15750,7 +15764,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -15826,8 +15840,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -15842,8 +15856,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -15858,8 +15872,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -15889,8 +15903,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -15901,7 +15915,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ExecutableResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new ExecutableResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -15935,9 +15949,9 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ExecutableResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ExecutableResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -15995,9 +16009,9 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -16007,7 +16021,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -16044,8 +16058,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -16071,7 +16085,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ExecutableResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ExecutableResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -16320,8 +16334,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -16495,8 +16509,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -16511,8 +16525,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -16648,8 +16662,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -17305,8 +17319,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -17397,7 +17411,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ExternalServiceResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ExternalServiceResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -17505,8 +17519,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -17532,7 +17546,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ExternalServiceResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ExternalServiceResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -17702,8 +17716,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -17857,8 +17871,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -17873,8 +17887,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -17995,8 +18009,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase /** @internal */ private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -18435,8 +18449,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise { - const buildImage = options?.buildImage; - const runtimeImage = options?.runtimeImage; + let buildImage = options?.buildImage; + let runtimeImage = options?.runtimeImage; return new ParameterResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -18453,7 +18467,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets a parameter description */ withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise { - const enableMarkdown = options?.enableMarkdown; + let enableMarkdown = options?.enableMarkdown; return new ParameterResourcePromiseImpl(this._withDescriptionInternal(description, enableMarkdown), this._client); } @@ -18470,7 +18484,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise { - const helpLink = options?.helpLink; + let helpLink = options?.helpLink; return new ParameterResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -18507,14 +18521,14 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ParameterResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ParameterResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -18525,7 +18539,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ParameterResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ParameterResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -18611,14 +18625,14 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ParameterResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -18633,8 +18647,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** @internal */ private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -18660,7 +18674,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise { - const iconVariant = options?.iconVariant; + let iconVariant = options?.iconVariant; return new ParameterResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -18700,10 +18714,10 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ParameterResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ParameterResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -18830,8 +18844,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ParameterResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new ParameterResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -18913,7 +18927,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ParameterResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new ParameterResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -18969,8 +18983,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** @internal */ private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -18985,8 +18999,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** @internal */ private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -19001,8 +19015,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -19123,8 +19137,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ParameterResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ParameterResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -19142,8 +19156,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ParameterResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ParameterResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -19617,8 +19631,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -19645,8 +19659,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise { - const buildImage = options?.buildImage; - const runtimeImage = options?.runtimeImage; + let buildImage = options?.buildImage; + let runtimeImage = options?.runtimeImage; return new ProjectResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -19664,8 +19678,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise { - const path = options?.path; - const endpointName = options?.endpointName; + let path = options?.path; + let endpointName = options?.endpointName; return new ProjectResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -19747,7 +19761,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise { - const configure = options?.configure; + let configure = options?.configure; return new ProjectResourcePromiseImpl(this._publishAsDockerFileInternal(configure), this._client); } @@ -19764,14 +19778,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise { - const helpLink = options?.helpLink; + let helpLink = options?.helpLink; return new ProjectResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -19786,8 +19800,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -19825,8 +19839,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -19844,8 +19858,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -19863,8 +19877,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -19917,8 +19931,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -19931,9 +19945,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new ProjectResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -19954,8 +19968,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -19970,8 +19984,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -20004,14 +20018,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ProjectResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const scheme = options?.scheme; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; - const isExternal = options?.isExternal; - const protocol = options?.protocol; + let port = options?.port; + let targetPort = options?.targetPort; + let scheme = options?.scheme; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; + let isExternal = options?.isExternal; + let protocol = options?.protocol; return new ProjectResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -20032,11 +20046,11 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ProjectResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new ProjectResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -20057,11 +20071,11 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ProjectResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new ProjectResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -20137,14 +20151,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ProjectResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ProjectResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -20155,7 +20169,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ProjectResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -20200,8 +20214,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved, destinationPath }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source, destinationPath }; const result = await this._client.invokeCapability( 'Aspire.Hosting/publishWithContainerFilesFromResource', rpcArgs @@ -20231,8 +20245,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -20247,8 +20261,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -20263,8 +20277,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -20279,8 +20293,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -20310,8 +20324,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -20322,7 +20336,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new ProjectResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -20356,9 +20370,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ProjectResourcePromise { - const path = options?.path; - const statusCode = options?.statusCode; - const endpointName = options?.endpointName; + let path = options?.path; + let statusCode = options?.statusCode; + let endpointName = options?.endpointName; return new ProjectResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -20380,7 +20394,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ProjectResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -20416,9 +20430,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -20428,7 +20442,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ProjectResourcePromise { - const password = options?.password; + let password = options?.password; return new ProjectResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } @@ -20449,8 +20463,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -20465,8 +20479,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -20492,7 +20506,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise { - const iconVariant = options?.iconVariant; + let iconVariant = options?.iconVariant; return new ProjectResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -20515,13 +20529,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ProjectResourcePromise { - const path = options?.path; - const initialDelaySeconds = options?.initialDelaySeconds; - const periodSeconds = options?.periodSeconds; - const timeoutSeconds = options?.timeoutSeconds; - const failureThreshold = options?.failureThreshold; - const successThreshold = options?.successThreshold; - const endpointName = options?.endpointName; + let path = options?.path; + let initialDelaySeconds = options?.initialDelaySeconds; + let periodSeconds = options?.periodSeconds; + let timeoutSeconds = options?.timeoutSeconds; + let failureThreshold = options?.failureThreshold; + let successThreshold = options?.successThreshold; + let endpointName = options?.endpointName; return new ProjectResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -20591,10 +20605,10 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ProjectResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ProjectResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -20741,8 +20755,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ProjectResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new ProjectResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -20844,7 +20858,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ProjectResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new ProjectResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -20900,8 +20914,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -20916,8 +20930,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -20932,8 +20946,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -21069,8 +21083,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ProjectResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ProjectResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -21088,8 +21102,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ProjectResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ProjectResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -21808,8 +21822,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -21835,7 +21849,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -22028,8 +22042,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -22071,8 +22085,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -22190,8 +22204,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -22229,8 +22243,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -22248,8 +22262,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -22267,8 +22281,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -22321,8 +22335,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -22335,9 +22349,9 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): TestDatabaseResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new TestDatabaseResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -22358,8 +22372,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -22374,8 +22388,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -22408,14 +22422,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -22559,7 +22573,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -22635,8 +22649,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -22651,8 +22665,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -22667,8 +22681,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -22698,8 +22712,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -22710,7 +22724,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new TestDatabaseResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -22744,9 +22758,9 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): TestDatabaseResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new TestDatabaseResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -22804,9 +22818,9 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -22816,7 +22830,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -22853,8 +22867,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -22880,7 +22894,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): TestDatabaseResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new TestDatabaseResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -23020,8 +23034,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -23323,8 +23337,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -23339,8 +23353,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -23476,8 +23490,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase /** @internal */ private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -24344,7 +24358,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise { - const isReadOnly = options?.isReadOnly; + let isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } @@ -24406,7 +24420,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestRedisResourcePromise { - const tag = options?.tag; + let tag = options?.tag; return new TestRedisResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } @@ -24499,8 +24513,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise { - const dockerfilePath = options?.dockerfilePath; - const stage = options?.stage; + let dockerfilePath = options?.dockerfilePath; + let stage = options?.stage; return new TestRedisResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } @@ -24521,8 +24535,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -24537,8 +24551,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -24580,8 +24594,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise { - const buildImage = options?.buildImage; - const runtimeImage = options?.runtimeImage; + let buildImage = options?.buildImage; + let runtimeImage = options?.runtimeImage; return new TestRedisResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -24614,8 +24628,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): TestRedisResourcePromise { - const path = options?.path; - const endpointName = options?.endpointName; + let path = options?.path; + let endpointName = options?.endpointName; return new TestRedisResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -24677,14 +24691,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise { - const helpLink = options?.helpLink; + let helpLink = options?.helpLink; return new TestRedisResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -24699,8 +24713,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -24738,8 +24752,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -24757,8 +24771,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -24776,8 +24790,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -24795,8 +24809,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionPropertyInternal(name: string, value: ReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', rpcArgs @@ -24861,8 +24875,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -24875,9 +24889,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new TestRedisResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -24907,8 +24921,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -24923,8 +24937,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -24957,14 +24971,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): TestRedisResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const scheme = options?.scheme; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; - const isExternal = options?.isExternal; - const protocol = options?.protocol; + let port = options?.port; + let targetPort = options?.targetPort; + let scheme = options?.scheme; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; + let isExternal = options?.isExternal; + let protocol = options?.protocol; return new TestRedisResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -24985,11 +24999,11 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): TestRedisResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new TestRedisResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -25010,11 +25024,11 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestRedisResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new TestRedisResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -25090,14 +25104,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestRedisResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new TestRedisResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -25108,7 +25122,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestRedisResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new TestRedisResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -25168,8 +25182,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -25184,8 +25198,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -25200,8 +25214,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -25216,8 +25230,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -25247,8 +25261,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -25259,7 +25273,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new TestRedisResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -25293,9 +25307,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestRedisResourcePromise { - const path = options?.path; - const statusCode = options?.statusCode; - const endpointName = options?.endpointName; + let path = options?.path; + let statusCode = options?.statusCode; + let endpointName = options?.endpointName; return new TestRedisResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -25317,7 +25331,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new TestRedisResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -25353,9 +25367,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -25365,7 +25379,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestRedisResourcePromise { - const password = options?.password; + let password = options?.password; return new TestRedisResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } @@ -25386,8 +25400,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -25402,8 +25416,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -25429,7 +25443,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise { - const iconVariant = options?.iconVariant; + let iconVariant = options?.iconVariant; return new TestRedisResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -25452,13 +25466,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestRedisResourcePromise { - const path = options?.path; - const initialDelaySeconds = options?.initialDelaySeconds; - const periodSeconds = options?.periodSeconds; - const timeoutSeconds = options?.timeoutSeconds; - const failureThreshold = options?.failureThreshold; - const successThreshold = options?.successThreshold; - const endpointName = options?.endpointName; + let path = options?.path; + let initialDelaySeconds = options?.initialDelaySeconds; + let periodSeconds = options?.periodSeconds; + let timeoutSeconds = options?.timeoutSeconds; + let failureThreshold = options?.failureThreshold; + let successThreshold = options?.successThreshold; + let endpointName = options?.endpointName; return new TestRedisResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -25528,10 +25542,10 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): TestRedisResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new TestRedisResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -25569,8 +25583,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): TestRedisResourcePromise { - const name = options?.name; - const isReadOnly = options?.isReadOnly; + let name = options?.name; + let isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } @@ -25716,7 +25730,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { - const databaseName = options?.databaseName; + let databaseName = options?.databaseName; return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName), this._client); } @@ -25733,7 +25747,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { - const mode = options?.mode; + let mode = options?.mode; return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode), this._client); } @@ -25751,8 +25765,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -25791,8 +25805,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionStringInternal(connectionString: ReferenceExpression): Promise { - const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; - const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; + connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -25888,7 +25902,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -25944,8 +25958,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -25999,8 +26013,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -26015,8 +26029,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -26061,7 +26075,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Gets the status of the resource asynchronously */ async getStatusAsync(options?: GetStatusAsyncOptions): Promise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -26091,7 +26105,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Waits for the resource to be ready */ async waitForReadyAsync(timeout: number, options?: WaitForReadyAsyncOptions): Promise { - const cancellationToken = options?.cancellationToken; + let cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle, timeout }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -26136,8 +26150,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a data volume with persistence */ withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { - const name = options?.name; - const isReadOnly = options?.isReadOnly; + let name = options?.name; + let isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly), this._client); } @@ -26215,8 +26229,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -26234,8 +26248,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -27106,8 +27120,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -27133,7 +27147,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise { - const isReadOnly = options?.isReadOnly; + let isReadOnly = options?.isReadOnly; return new TestVaultResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } @@ -27195,7 +27209,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestVaultResourcePromise { - const tag = options?.tag; + let tag = options?.tag; return new TestVaultResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } @@ -27288,8 +27302,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise { - const dockerfilePath = options?.dockerfilePath; - const stage = options?.stage; + let dockerfilePath = options?.dockerfilePath; + let stage = options?.stage; return new TestVaultResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } @@ -27310,8 +27324,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildArg', rpcArgs @@ -27326,8 +27340,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterBuildSecret', rpcArgs @@ -27369,8 +27383,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise { - const buildImage = options?.buildImage; - const runtimeImage = options?.runtimeImage; + let buildImage = options?.buildImage; + let runtimeImage = options?.runtimeImage; return new TestVaultResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -27403,8 +27417,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): TestVaultResourcePromise { - const path = options?.path; - const endpointName = options?.endpointName; + let path = options?.path; + let endpointName = options?.endpointName; return new TestVaultResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -27466,14 +27480,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise { - const helpLink = options?.helpLink; + let helpLink = options?.helpLink; return new TestVaultResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } /** @internal */ private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -27488,8 +27502,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -27527,8 +27541,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -27546,8 +27560,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -27565,8 +27579,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -27619,8 +27633,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -27633,9 +27647,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new TestVaultResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -27656,8 +27670,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -27672,8 +27686,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -27706,14 +27720,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): TestVaultResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const scheme = options?.scheme; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; - const isExternal = options?.isExternal; - const protocol = options?.protocol; + let port = options?.port; + let targetPort = options?.targetPort; + let scheme = options?.scheme; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; + let isExternal = options?.isExternal; + let protocol = options?.protocol; return new TestVaultResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -27734,11 +27748,11 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): TestVaultResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new TestVaultResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -27759,11 +27773,11 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestVaultResourcePromise { - const port = options?.port; - const targetPort = options?.targetPort; - const name = options?.name; - const env = options?.env; - const isProxied = options?.isProxied; + let port = options?.port; + let targetPort = options?.targetPort; + let name = options?.name; + let env = options?.env; + let isProxied = options?.isProxied; return new TestVaultResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -27839,14 +27853,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestVaultResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new TestVaultResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -27857,7 +27871,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestVaultResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new TestVaultResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -27917,8 +27931,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -27933,8 +27947,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -27949,8 +27963,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -27965,8 +27979,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -27996,8 +28010,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -28008,7 +28022,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new TestVaultResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -28042,9 +28056,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestVaultResourcePromise { - const path = options?.path; - const statusCode = options?.statusCode; - const endpointName = options?.endpointName; + let path = options?.path; + let statusCode = options?.statusCode; + let endpointName = options?.endpointName; return new TestVaultResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -28066,7 +28080,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new TestVaultResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -28102,9 +28116,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -28114,7 +28128,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures HTTPS with a developer certificate */ withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestVaultResourcePromise { - const password = options?.password; + let password = options?.password; return new TestVaultResourcePromiseImpl(this._withHttpsDeveloperCertificateInternal(password), this._client); } @@ -28135,8 +28149,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -28151,8 +28165,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -28178,7 +28192,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise { - const iconVariant = options?.iconVariant; + let iconVariant = options?.iconVariant; return new TestVaultResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -28201,13 +28215,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestVaultResourcePromise { - const path = options?.path; - const initialDelaySeconds = options?.initialDelaySeconds; - const periodSeconds = options?.periodSeconds; - const timeoutSeconds = options?.timeoutSeconds; - const failureThreshold = options?.failureThreshold; - const successThreshold = options?.successThreshold; - const endpointName = options?.endpointName; + let path = options?.path; + let initialDelaySeconds = options?.initialDelaySeconds; + let periodSeconds = options?.periodSeconds; + let timeoutSeconds = options?.timeoutSeconds; + let failureThreshold = options?.failureThreshold; + let successThreshold = options?.successThreshold; + let endpointName = options?.endpointName; return new TestVaultResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -28277,10 +28291,10 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): TestVaultResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new TestVaultResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -28318,8 +28332,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): TestVaultResourcePromise { - const name = options?.name; - const isReadOnly = options?.isReadOnly; + let name = options?.name; + let isReadOnly = options?.isReadOnly; return new TestVaultResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } @@ -28446,8 +28460,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -28549,7 +28563,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -28605,8 +28619,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -28621,8 +28635,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -28637,8 +28651,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -28789,8 +28803,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -28808,8 +28822,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -29490,8 +29504,8 @@ class ContainerFilesDestinationResourceImpl extends ResourceBuilderBase, destinationPath: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved, destinationPath }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source, destinationPath }; const result = await this._client.invokeCapability( 'Aspire.Hosting/publishWithContainerFilesFromResource', rpcArgs @@ -29640,8 +29654,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const registry_resolved = isPromiseLike(registry) ? await registry : registry; - const rpcArgs: Record = { builder: this._handle, registry: registry_resolved }; + registry = isPromiseLike(registry) ? await registry : registry; + const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withContainerRegistry', rpcArgs @@ -29668,8 +29682,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise { - const buildImage = options?.buildImage; - const runtimeImage = options?.runtimeImage; + let buildImage = options?.buildImage; + let runtimeImage = options?.runtimeImage; return new ResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -29686,7 +29700,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise { - const helpLink = options?.helpLink; + let helpLink = options?.helpLink; return new ResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -29723,14 +29737,14 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - const url_resolved = isPromiseLike(url) ? await url : url; - const rpcArgs: Record = { builder: this._handle, url: url_resolved }; + url = isPromiseLike(url) ? await url : url; + const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( 'Aspire.Hosting/withUrlExpression', @@ -29741,7 +29755,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ResourcePromise { - const displayText = options?.displayText; + let displayText = options?.displayText; return new ResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -29827,14 +29841,14 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise { - const commandOptions = options?.commandOptions; + let commandOptions = options?.commandOptions; return new ResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } /** @internal */ private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const parent_resolved = isPromiseLike(parent) ? await parent : parent; - const rpcArgs: Record = { builder: this._handle, parent: parent_resolved }; + parent = isPromiseLike(parent) ? await parent : parent; + const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderParentRelationship', rpcArgs @@ -29849,8 +29863,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const child_resolved = isPromiseLike(child) ? await child : child; - const rpcArgs: Record = { builder: this._handle, child: child_resolved }; + child = isPromiseLike(child) ? await child : child; + const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withBuilderChildRelationship', rpcArgs @@ -29876,7 +29890,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise { - const iconVariant = options?.iconVariant; + let iconVariant = options?.iconVariant; return new ResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -29916,10 +29930,10 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ResourcePromise { - const dependsOn = options?.dependsOn; - const requiredBy = options?.requiredBy; - const tags = options?.tags; - const description = options?.description; + let dependsOn = options?.dependsOn; + let requiredBy = options?.requiredBy; + let tags = options?.tags; + let description = options?.description; return new ResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -30046,8 +30060,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { - const value = options?.value; - const enabled = options?.enabled; + let value = options?.value; + let enabled = options?.enabled; return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -30129,7 +30143,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { - const callback = options?.callback; + let callback = options?.callback; return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -30185,8 +30199,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/testWaitFor', rpcArgs @@ -30201,8 +30215,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withDependency', rpcArgs @@ -30217,8 +30231,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withUnionDependency', rpcArgs @@ -30339,8 +30353,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -30358,8 +30372,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { - const enableConsole = options?.enableConsole; - const maxFiles = options?.maxFiles; + let enableConsole = options?.enableConsole; + let maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -30758,8 +30772,8 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', rpcArgs @@ -30818,8 +30832,8 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - const connectionString_resolved = isPromiseLike(connectionString) ? await connectionString : connectionString; - const rpcArgs: Record = { builder: this._handle, connectionString: connectionString_resolved }; + connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; + const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', rpcArgs @@ -31039,8 +31053,8 @@ class ResourceWithEndpointsImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironment', rpcArgs @@ -31434,8 +31448,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase { - const value_resolved = isPromiseLike(value) ? await value : value; - const rpcArgs: Record = { builder: this._handle, name, value: value_resolved }; + value = isPromiseLike(value) ? await value : value; + const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', rpcArgs @@ -31473,8 +31487,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, name, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentEndpoint', rpcArgs @@ -31492,8 +31506,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { - const parameter_resolved = isPromiseLike(parameter) ? await parameter : parameter; - const rpcArgs: Record = { builder: this._handle, name, parameter: parameter_resolved }; + parameter = isPromiseLike(parameter) ? await parameter : parameter; + const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentParameter', rpcArgs @@ -31511,8 +31525,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { - const resource_resolved = isPromiseLike(resource) ? await resource : resource; - const rpcArgs: Record = { builder: this._handle, envVarName, resource: resource_resolved }; + resource = isPromiseLike(resource) ? await resource : resource; + const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentConnectionString', rpcArgs @@ -31530,8 +31544,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase, connectionName?: string, optional?: boolean, name?: string): Promise { - const source_resolved = isPromiseLike(source) ? await source : source; - const rpcArgs: Record = { builder: this._handle, source: source_resolved }; + source = isPromiseLike(source) ? await source : source; + const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; if (optional !== undefined) rpcArgs.optional = optional; if (name !== undefined) rpcArgs.name = name; @@ -31544,9 +31558,9 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { - const connectionName = options?.connectionName; - const optional = options?.optional; - const name = options?.name; + let connectionName = options?.connectionName; + let optional = options?.optional; + let name = options?.name; return new ResourceWithEnvironmentPromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -31567,8 +31581,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { - const externalService_resolved = isPromiseLike(externalService) ? await externalService : externalService; - const rpcArgs: Record = { builder: this._handle, externalService: externalService_resolved }; + externalService = isPromiseLike(externalService) ? await externalService : externalService; + const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceExternalService', rpcArgs @@ -31583,8 +31597,8 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { - const endpointReference_resolved = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; - const rpcArgs: Record = { builder: this._handle, endpointReference: endpointReference_resolved }; + endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; + const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withReferenceEndpoint', rpcArgs @@ -31629,9 +31643,9 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { - const password_resolved = isPromiseLike(password) ? await password : password; + password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; - if (password !== undefined) rpcArgs.password = password_resolved; + if (password !== undefined) rpcArgs.password = password; const result = await this._client.invokeCapability( 'Aspire.Hosting/withParameterHttpsDeveloperCertificate', rpcArgs @@ -31641,7 +31655,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResource', rpcArgs @@ -31866,8 +31880,8 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForWithBehavior', rpcArgs @@ -31882,8 +31896,8 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceStart', rpcArgs @@ -31898,8 +31912,8 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved, waitBehavior }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForStartWithBehavior', rpcArgs @@ -31914,8 +31928,8 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, exitCode?: number): Promise { - const dependency_resolved = isPromiseLike(dependency) ? await dependency : dependency; - const rpcArgs: Record = { builder: this._handle, dependency: dependency_resolved }; + dependency = isPromiseLike(dependency) ? await dependency : dependency; + const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; const result = await this._client.invokeCapability( 'Aspire.Hosting/waitForResourceCompletion', @@ -31926,7 +31940,7 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { - const exitCode = options?.exitCode; + let exitCode = options?.exitCode; return new ResourceWithWaitSupportPromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } diff --git a/tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs b/tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs deleted file mode 100644 index 9b9414c4276..00000000000 --- a/tests/Aspire.Hosting.Tests/PublishedRuntimeReferenceDiagnosticTests.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace Aspire.Hosting.Tests; - -public class PublishedRuntimeReferenceDiagnosticTests -{ - [Fact] - public void MissingPublishedRuntimeMessage_ExplainsExcludedResources() - { - var resource = new ContainerResource("excluded"); - resource.Annotations.Add(ManifestPublishingCallbackAnnotation.Ignore); - - var model = new DistributedApplicationModel([resource]); - - var message = model.GetMissingPublishedRuntimeReferenceMessage(resource, "Docker Compose"); - - Assert.Equal("Resource 'excluded' is referenced by Docker Compose, but it was excluded from publish. If that exclusion is intentional, mark the reference optional.", message); - } - - [Fact] - public void MissingPublishedRuntimeMessage_ExplainsBuildOnlyResourcesWithNoConsumers() - { - var resource = new ContainerResource("frontend"); - resource.Annotations.Add(new DockerfileBuildAnnotation(".", "Dockerfile", null) { HasEntrypoint = false }); - - var model = new DistributedApplicationModel([resource]); - - var message = model.GetMissingPublishedRuntimeReferenceMessage(resource, "Docker Compose"); - - Assert.Equal("Resource 'frontend' is referenced by Docker Compose, but it does not publish a runtime. It is a build-only resource, and nothing consumes its published output. Remove the runtime reference, or wire its output into another resource with PublishWithContainerFiles(...).", message); - } - - [Fact] - public void MissingPublishedRuntimeMessage_ExplainsBuildOnlyResourcesUsedAsBuildArtifacts() - { - var source = new ContainerResource("frontend"); - source.Annotations.Add(new DockerfileBuildAnnotation(".", "Dockerfile", null) { HasEntrypoint = false }); - - var destination = new ContainerResource("gateway"); - destination.Annotations.Add(new ContainerFilesDestinationAnnotation - { - Source = source, - DestinationPath = "/app/public" - }); - - var model = new DistributedApplicationModel([source, destination]); - - var message = model.GetMissingPublishedRuntimeReferenceMessage(source, "Docker Compose"); - - Assert.Equal("Resource 'frontend' is referenced by Docker Compose, but it does not publish a runtime. It is a build-only resource. Remove the runtime reference and use it only as a build artifact.", message); - } -} From 58dbb230e6dad70ceedd46005272b34086edcfd8 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 10:33:53 -0700 Subject: [PATCH 04/13] Address PR feedback: revert aspire.config.json, use promise.finally() - Revert playground/TypeScriptAppHost/aspire.config.json changes - Use promise.finally() instead of .then(cleanup, cleanup) for cleaner promise tracking Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- playground/TypeScriptAppHost/aspire.config.json | 6 +----- .../Resources/transport.ts | 5 +---- .../Snapshots/transport.verified.ts | 5 +---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/playground/TypeScriptAppHost/aspire.config.json b/playground/TypeScriptAppHost/aspire.config.json index d04d0c45c39..a67304c6ba0 100644 --- a/playground/TypeScriptAppHost/aspire.config.json +++ b/playground/TypeScriptAppHost/aspire.config.json @@ -3,14 +3,10 @@ "path": "apphost.ts", "language": "typescript/nodejs" }, - "sdk": { - "version": "13.3.0-dev" - }, - "channel": "daily", "packages": { "Aspire.Hosting.PostgreSQL": "", "Aspire.Hosting.Redis": "", "Aspire.Hosting.JavaScript": "", "Aspire.Hosting.Docker": "" } -} \ No newline at end of file +} diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts index b877bda9c91..6db6222eef4 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts @@ -761,10 +761,7 @@ export class AspireClient implements AspireClientRpc { trackPromise(promise: Promise): void { this._pendingPromises.add(promise); - promise.then( - () => this._pendingPromises.delete(promise), - () => this._pendingPromises.delete(promise) - ); + promise.finally(() => this._pendingPromises.delete(promise)); } async flushPendingPromises(): Promise { diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts index b877bda9c91..6db6222eef4 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts @@ -761,10 +761,7 @@ export class AspireClient implements AspireClientRpc { trackPromise(promise: Promise): void { this._pendingPromises.add(promise); - promise.then( - () => this._pendingPromises.delete(promise), - () => this._pendingPromises.delete(promise) - ); + promise.finally(() => this._pendingPromises.delete(promise)); } async flushPendingPromises(): Promise { From 9e7e00af274289b08e0109be45d3ccf98ec87faa Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 10:41:52 -0700 Subject: [PATCH 05/13] Unify promise resolution logic across all codegen paths - Add GenerateResolveAndBuildArgs unified helper for resolve + arg building - Add GeneratePromiseResolutionForParam for property setters - Fix GenerateEntryPointFunction: add promise resolution (async IIFE for fluent path) - Use shared helpers in context/wrapper methods instead of inline logic - Target let/const: only use let for handle-type optional params Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AtsTypeScriptCodeGenerator.cs | 134 +- .../Snapshots/AtsGeneratedAspire.verified.ts | 72 +- ...TwoPassScanningGeneratedAspire.verified.ts | 1212 ++++++++--------- 3 files changed, 725 insertions(+), 693 deletions(-) diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index 2100cc7a887..711a3c385e2 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -1448,7 +1448,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" let {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Handle callback registration if any @@ -1541,7 +1541,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Extract optional params from options object and forward to internal method foreach (var param in optionalParams) { - WriteLine($" let {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Forward all params to internal method @@ -1556,7 +1556,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab /// /// Generates promise resolution code for handle-type parameters that may be PromiseLike. /// - private void GeneratePromiseResolution(IReadOnlyList parameters) + private void GeneratePromiseResolution(IReadOnlyList parameters, string indent = " ") { foreach (var param in parameters) { @@ -1567,11 +1567,22 @@ private void GeneratePromiseResolution(IReadOnlyList parameter if (IsHandleOrHandleUnionType(param.Type)) { - WriteLine($" {param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); + WriteLine($"{indent}{param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); } } } + /// + /// Generates promise resolution for a single named parameter. + /// + private void GeneratePromiseResolutionForParam(string paramName, AtsTypeRef? paramType, string indent = " ") + { + if (IsHandleOrHandleUnionType(paramType)) + { + WriteLine($"{indent}{paramName} = isPromiseLike({paramName}) ? await {paramName} : {paramName};"); + } + } + /// /// Checks if a type is a handle type or a union containing handle types. /// @@ -1595,6 +1606,37 @@ private static bool IsHandleOrHandleUnionType(AtsTypeRef? typeRef) return false; } + /// + /// Generates promise resolution and args object construction in one step. + /// This is the unified helper used by builder methods, type class methods, context methods, and wrapper methods. + /// + private void GenerateResolveAndBuildArgs( + string targetParamName, + IReadOnlyList allParams, + List requiredParams, + List optionalParams, + string indent = " ") + { + // Resolve any promise-like handle parameters + GeneratePromiseResolution(allParams, indent); + + // Build the required args inline + var requiredArgs = new List { $"{targetParamName}: this._handle" }; + foreach (var param in requiredParams) + { + requiredArgs.Add(GetRpcArgumentEntry(param)); + } + + WriteLine($"{indent}const rpcArgs: Record = {{ {string.Join(", ", requiredArgs)} }};"); + + // Conditionally add optional params + foreach (var param in optionalParams) + { + var rpcExpression = GetRpcArgumentExpression(param); + WriteLine($"{indent}if ({param.Name} !== undefined) rpcArgs.{param.Name} = {rpcExpression};"); + } + } + /// /// Generates an args object with conditional inclusion of optional parameters. /// @@ -1796,18 +1838,30 @@ private void GenerateEntryPointFunction(AtsCapabilityInfo capability) Write($"export function {methodName}("); Write(paramsString); WriteLine($"): {returnPromiseWrapper} {{"); + // Use async IIFE to resolve promise-like handle params before RPC + WriteLine($" const promise = (async () => {{"); + // Resolve promise-like handle params + foreach (var param in capability.Parameters) + { + if (!param.IsCallback && IsHandleOrHandleUnionType(param.Type)) + { + WriteLine($" {param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); + } + } var requiredArgs = requiredParams .Select(param => GetRpcArgumentEntry(param, useRegisteredCallback: false)) .ToList(); - WriteLine($" const rpcArgs: Record = {{ {string.Join(", ", requiredArgs)} }};"); + WriteLine($" const rpcArgs: Record = {{ {string.Join(", ", requiredArgs)} }};"); foreach (var param in optionalParams) { - WriteLine($" if ({param.Name} !== undefined) rpcArgs.{param.Name} = {GetRpcArgumentExpression(param, useRegisteredCallback: false)};"); + WriteLine($" if ({param.Name} !== undefined) rpcArgs.{param.Name} = {GetRpcArgumentExpression(param, useRegisteredCallback: false)};"); } - WriteLine($" const promise = client.invokeCapability<{handleType}>("); - WriteLine($" '{capability.CapabilityId}',"); - WriteLine(" rpcArgs"); - WriteLine($" ).then(handle => new {returnWrapperImplementationClass}(handle, client));"); + WriteLine($" const handle = await client.invokeCapability<{handleType}>("); + WriteLine($" '{capability.CapabilityId}',"); + WriteLine(" rpcArgs"); + WriteLine(" );"); + WriteLine($" return new {returnWrapperImplementationClass}(handle, client);"); + WriteLine($" }})();"); WriteLine($" return new {returnPromiseImplementationClass}(promise, client);"); WriteLine("}"); } @@ -1821,6 +1875,14 @@ private void GenerateEntryPointFunction(AtsCapabilityInfo capability) Write($"export async function {methodName}("); Write(paramsString); WriteLine($"): Promise<{returnType}> {{"); + // Resolve promise-like handle params + foreach (var param in capability.Parameters) + { + if (!param.IsCallback && IsHandleOrHandleUnionType(param.Type)) + { + WriteLine($" {param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); + } + } var requiredArgs = requiredParams .Select(param => GetRpcArgumentEntry(param, useRegisteredCallback: false)) .ToList(); @@ -2365,10 +2427,7 @@ private void GeneratePropertyLikeObject(string propertyName, AtsCapabilityInfo? { var valueType = MapInputTypeToTypeScript(valueParam.Type); WriteLine($" set: async (value: {valueType}): Promise => {{"); - if (IsHandleOrHandleUnionType(valueParam.Type)) - { - WriteLine($" value = isPromiseLike(value) ? await value : value;"); - } + GeneratePromiseResolutionForParam("value", valueParam.Type, " "); WriteLine($" await this._client.invokeCapability("); WriteLine($" '{setter.CapabilityId}',"); WriteLine($" {{ context: this._handle, {GetRpcArgumentEntry("value", valueParam.Type)} }}"); @@ -2410,10 +2469,7 @@ private void GenerateWrapperPropertyObject(string propertyName, AtsCapabilityInf { var valueType = MapInputTypeToTypeScript(valueParam.Type); WriteLine($" set: async (value: {valueType}): Promise => {{"); - if (IsHandleOrHandleUnionType(valueParam.Type)) - { - WriteLine($" value = isPromiseLike(value) ? await value : value;"); - } + GeneratePromiseResolutionForParam("value", valueParam.Type, " "); WriteLine($" await this._client.invokeCapability("); WriteLine($" '{setter.CapabilityId}',"); WriteLine($" {{ context: this._handle, {GetRpcArgumentEntry("value", valueParam.Type)} }}"); @@ -2573,23 +2629,11 @@ private void GenerateContextMethod(AtsCapabilityInfo method) // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" let {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } - // Resolve any promise-like handle parameters - GeneratePromiseResolution(userParams); - - // Build args object with conditional inclusion - var requiredArgs = new List { $"{targetParamName}: this._handle" }; - foreach (var param in requiredParams) - { - requiredArgs.Add(GetRpcArgumentEntry(param.Name, param.Type)); - } - WriteLine($" const rpcArgs: Record = {{ {string.Join(", ", requiredArgs)} }};"); - foreach (var param in optionalParams) - { - WriteLine($" if ({param.Name} !== undefined) rpcArgs.{param.Name} = {GetRpcArgumentValueExpression(param.Name, param.Type)};"); - } + // Resolve promise-like params and build args + GenerateResolveAndBuildArgs(targetParamName, userParams, requiredParams, optionalParams); if (returnType == "void") { @@ -2662,23 +2706,11 @@ private void GenerateWrapperMethod(AtsCapabilityInfo capability) // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" let {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } - // Resolve any promise-like handle parameters - GeneratePromiseResolution(userParams); - - // Build args object with conditional inclusion - var requiredArgs = new List { $"{firstParamName}: this._handle" }; - foreach (var param in requiredParams) - { - requiredArgs.Add(GetRpcArgumentEntry(param.Name, param.Type)); - } - WriteLine($" const rpcArgs: Record = {{ {string.Join(", ", requiredArgs)} }};"); - foreach (var param in optionalParams) - { - WriteLine($" if ({param.Name} !== undefined) rpcArgs.{param.Name} = {GetRpcArgumentValueExpression(param.Name, param.Type)};"); - } + // Resolve promise-like params and build args + GenerateResolveAndBuildArgs(firstParamName, userParams, requiredParams, optionalParams); if (returnType == "void") { @@ -2796,7 +2828,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params and forward foreach (var param in optionalParams) { - WriteLine($" let {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } Write($" return new {returnPromiseImplementationClass}(this.{internalMethodName}("); @@ -2842,7 +2874,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params and forward foreach (var param in optionalParams) { - WriteLine($" let {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } Write($" return new {promiseImplementationClass}(this.{internalMethodName}("); @@ -2860,7 +2892,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" let {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Handle callback registration if any diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts index d94677aecd3..fd96cda689a 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts @@ -562,7 +562,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { - let port = options?.port; + const port = options?.port; return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port), this._client); } @@ -694,8 +694,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { - let databaseName = options?.databaseName; + const databaseName = options?.databaseName; return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName), this._client); } @@ -1361,7 +1361,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { - let mode = options?.mode; + const mode = options?.mode; return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode), this._client); } @@ -1379,8 +1379,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -1516,7 +1516,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -1689,7 +1689,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Gets the status of the resource asynchronously */ async getStatusAsync(options?: GetStatusAsyncOptions): Promise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -1719,7 +1719,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Waits for the resource to be ready */ async waitForReadyAsync(timeout: number, options?: WaitForReadyAsyncOptions): Promise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle, timeout }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -1764,8 +1764,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a data volume with persistence */ withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { - let name = options?.name; - let isReadOnly = options?.isReadOnly; + const name = options?.name; + const isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly), this._client); } @@ -1843,8 +1843,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -1862,8 +1862,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -2182,8 +2182,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -2285,7 +2285,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -2525,8 +2525,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -2544,8 +2544,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -2803,8 +2803,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -2886,7 +2886,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -3096,8 +3096,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -3115,8 +3115,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts index 5b1a71fe358..f07b319ea0b 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts @@ -1066,7 +1066,7 @@ class DistributedApplicationImpl implements DistributedApplication { } run(options?: RunOptions): DistributedApplicationPromise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; return new DistributedApplicationPromiseImpl(this._runInternal(cancellationToken), this._client); } @@ -1491,7 +1491,7 @@ class EndpointReferenceImpl implements EndpointReference { /** Gets the URL of the endpoint asynchronously */ async getValueAsync(options?: GetValueAsyncOptions): Promise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; const rpcArgs: Record = { context: this._handle }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -2798,7 +2798,7 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { } appendFormatted(value: string, options?: AppendFormattedOptions): ReferenceExpressionBuilderPromise { - let format = options?.format; + const format = options?.format; return new ReferenceExpressionBuilderPromiseImpl(this._appendFormattedInternal(value, format), this._client); } @@ -2815,7 +2815,7 @@ class ReferenceExpressionBuilderImpl implements ReferenceExpressionBuilder { } appendValueProvider(valueProvider: any, options?: AppendValueProviderOptions): ReferenceExpressionBuilderPromise { - let format = options?.format; + const format = options?.format; return new ReferenceExpressionBuilderPromiseImpl(this._appendValueProviderInternal(valueProvider, format), this._client); } @@ -3055,7 +3055,7 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { } waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise { - let targetState = options?.targetState; + const targetState = options?.targetState; return new ResourceNotificationServicePromiseImpl(this._waitForResourceStateInternal(resourceName, targetState), this._client); } @@ -3117,8 +3117,8 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { } publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { - let state = options?.state; - let stateStyle = options?.stateStyle; + const state = options?.state; + const stateStyle = options?.stateStyle; return new ResourceNotificationServicePromiseImpl(this._publishResourceUpdateInternal(resource, state, stateStyle), this._client); } @@ -4126,7 +4126,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise { - let repository = options?.repository; + const repository = options?.repository; return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryFromStringInternal(name, endpoint, repository), this._client); } @@ -4159,8 +4159,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise { - let dockerfilePath = options?.dockerfilePath; - let stage = options?.stage; + const dockerfilePath = options?.dockerfilePath; + const stage = options?.stage; return new ContainerResourcePromiseImpl(this._addDockerfileInternal(name, contextPath, dockerfilePath, stage), this._client); } @@ -4253,7 +4253,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise { - let secret = options?.secret; + const secret = options?.secret; return new ParameterResourcePromiseImpl(this._addParameterInternal(name, secret), this._client); } @@ -4271,8 +4271,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise { - let publishValueAsDefault = options?.publishValueAsDefault; - let secret = options?.secret; + const publishValueAsDefault = options?.publishValueAsDefault; + const secret = options?.secret; return new ParameterResourcePromiseImpl(this._addParameterWithValueInternal(name, value, publishValueAsDefault, secret), this._client); } @@ -4289,7 +4289,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise { - let secret = options?.secret; + const secret = options?.secret; return new ParameterResourcePromiseImpl(this._addParameterFromConfigurationInternal(name, configurationKey, secret), this._client); } @@ -4306,7 +4306,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addConnectionString(name: string, options?: AddConnectionStringOptions): ResourceWithConnectionStringPromise { - let environmentVariableName = options?.environmentVariableName; + const environmentVariableName = options?.environmentVariableName; return new ResourceWithConnectionStringPromiseImpl(this._addConnectionStringInternal(name, environmentVariableName), this._client); } @@ -4436,7 +4436,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } addTestRedis(name: string, options?: AddTestRedisOptions): TestRedisResourcePromise { - let port = options?.port; + const port = options?.port; return new TestRedisResourcePromiseImpl(this._addTestRedisInternal(name, port), this._client); } @@ -5039,7 +5039,7 @@ class ReportingStepImpl implements ReportingStep { } createTask(statusText: string, options?: CreateTaskOptions): ReportingTaskPromise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._createTaskInternal(statusText, cancellationToken), this._client); } @@ -5056,7 +5056,7 @@ class ReportingStepImpl implements ReportingStep { } createMarkdownTask(markdownString: string, options?: CreateMarkdownTaskOptions): ReportingTaskPromise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._createMarkdownTaskInternal(markdownString, cancellationToken), this._client); } @@ -5104,8 +5104,8 @@ class ReportingStepImpl implements ReportingStep { } completeStep(completionText: string, options?: CompleteStepOptions): ReportingStepPromise { - let completionState = options?.completionState; - let cancellationToken = options?.cancellationToken; + const completionState = options?.completionState; + const cancellationToken = options?.cancellationToken; return new ReportingStepPromiseImpl(this._completeStepInternal(completionText, completionState, cancellationToken), this._client); } @@ -5123,8 +5123,8 @@ class ReportingStepImpl implements ReportingStep { } completeStepMarkdown(markdownString: string, options?: CompleteStepMarkdownOptions): ReportingStepPromise { - let completionState = options?.completionState; - let cancellationToken = options?.cancellationToken; + const completionState = options?.completionState; + const cancellationToken = options?.cancellationToken; return new ReportingStepPromiseImpl(this._completeStepMarkdownInternal(markdownString, completionState, cancellationToken), this._client); } @@ -5222,7 +5222,7 @@ class ReportingTaskImpl implements ReportingTask { } updateTask(statusText: string, options?: UpdateTaskOptions): ReportingTaskPromise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._updateTaskInternal(statusText, cancellationToken), this._client); } @@ -5239,7 +5239,7 @@ class ReportingTaskImpl implements ReportingTask { } updateTaskMarkdown(markdownString: string, options?: UpdateTaskMarkdownOptions): ReportingTaskPromise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._updateTaskMarkdownInternal(markdownString, cancellationToken), this._client); } @@ -5258,9 +5258,9 @@ class ReportingTaskImpl implements ReportingTask { } completeTask(options?: CompleteTaskOptions): ReportingTaskPromise { - let completionMessage = options?.completionMessage; - let completionState = options?.completionState; - let cancellationToken = options?.cancellationToken; + const completionMessage = options?.completionMessage; + const completionState = options?.completionState; + const cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._completeTaskInternal(completionMessage, completionState, cancellationToken), this._client); } @@ -5278,8 +5278,8 @@ class ReportingTaskImpl implements ReportingTask { } completeTaskMarkdown(markdownString: string, options?: CompleteTaskMarkdownOptions): ReportingTaskPromise { - let completionState = options?.completionState; - let cancellationToken = options?.cancellationToken; + const completionState = options?.completionState; + const cancellationToken = options?.cancellationToken; return new ReportingTaskPromiseImpl(this._completeTaskMarkdownInternal(markdownString, completionState, cancellationToken), this._client); } @@ -5575,7 +5575,7 @@ class UserSecretsManagerImpl implements UserSecretsManager { } saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; return new UserSecretsManagerPromiseImpl(this._saveStateJsonInternal(json, cancellationToken), this._client); } @@ -5789,8 +5789,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new ConnectionStringResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -6070,7 +6070,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ConnectionStringResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ConnectionStringResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -6119,7 +6119,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ConnectionStringResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ConnectionStringResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -6309,8 +6309,8 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ContainerRegistryResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -7329,7 +7329,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ContainerRegistryResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ContainerRegistryResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -7499,8 +7499,8 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise { - let isReadOnly = options?.isReadOnly; + const isReadOnly = options?.isReadOnly; return new ContainerResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } @@ -8398,7 +8398,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): ContainerResourcePromise { - let tag = options?.tag; + const tag = options?.tag; return new ContainerResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } @@ -8491,8 +8491,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise { - let dockerfilePath = options?.dockerfilePath; - let stage = options?.stage; + const dockerfilePath = options?.dockerfilePath; + const stage = options?.stage; return new ContainerResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } @@ -8572,8 +8572,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise { - let buildImage = options?.buildImage; - let runtimeImage = options?.runtimeImage; + const buildImage = options?.buildImage; + const runtimeImage = options?.runtimeImage; return new ContainerResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -8606,8 +8606,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ContainerResourcePromise { - let path = options?.path; - let endpointName = options?.endpointName; + const path = options?.path; + const endpointName = options?.endpointName; return new ContainerResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -8669,7 +8669,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise { - let helpLink = options?.helpLink; + const helpLink = options?.helpLink; return new ContainerResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -8836,9 +8836,9 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new ContainerResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -8909,14 +8909,14 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ContainerResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let scheme = options?.scheme; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; - let isExternal = options?.isExternal; - let protocol = options?.protocol; + const port = options?.port; + const targetPort = options?.targetPort; + const scheme = options?.scheme; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; + const isExternal = options?.isExternal; + const protocol = options?.protocol; return new ContainerResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -8937,11 +8937,11 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ContainerResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new ContainerResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -8962,11 +8962,11 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ContainerResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new ContainerResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -9042,7 +9042,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ContainerResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ContainerResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } @@ -9060,7 +9060,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ContainerResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ContainerResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -9211,7 +9211,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new ContainerResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -9245,9 +9245,9 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ContainerResourcePromise { - let path = options?.path; - let statusCode = options?.statusCode; - let endpointName = options?.endpointName; + const path = options?.path; + const statusCode = options?.statusCode; + const endpointName = options?.endpointName; return new ContainerResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -9269,7 +9269,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ContainerResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -9381,7 +9381,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise { - let iconVariant = options?.iconVariant; + const iconVariant = options?.iconVariant; return new ContainerResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -9404,13 +9404,13 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ContainerResourcePromise { - let path = options?.path; - let initialDelaySeconds = options?.initialDelaySeconds; - let periodSeconds = options?.periodSeconds; - let timeoutSeconds = options?.timeoutSeconds; - let failureThreshold = options?.failureThreshold; - let successThreshold = options?.successThreshold; - let endpointName = options?.endpointName; + const path = options?.path; + const initialDelaySeconds = options?.initialDelaySeconds; + const periodSeconds = options?.periodSeconds; + const timeoutSeconds = options?.timeoutSeconds; + const failureThreshold = options?.failureThreshold; + const successThreshold = options?.successThreshold; + const endpointName = options?.endpointName; return new ContainerResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -9480,10 +9480,10 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ContainerResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -9521,8 +9521,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): ContainerResourcePromise { - let name = options?.name; - let isReadOnly = options?.isReadOnly; + const name = options?.name; + const isReadOnly = options?.isReadOnly; return new ContainerResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } @@ -9649,8 +9649,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ContainerResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new ContainerResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -9752,7 +9752,7 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ContainerResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new ContainerResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -9977,8 +9977,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ContainerResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ContainerResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -9996,8 +9996,8 @@ class ContainerResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ContainerResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ContainerResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -10786,8 +10786,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise { - let buildImage = options?.buildImage; - let runtimeImage = options?.runtimeImage; + const buildImage = options?.buildImage; + const runtimeImage = options?.runtimeImage; return new CSharpAppResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -10805,8 +10805,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise { - let path = options?.path; - let endpointName = options?.endpointName; + const path = options?.path; + const endpointName = options?.endpointName; return new CSharpAppResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -10888,7 +10888,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise { - let configure = options?.configure; + const configure = options?.configure; return new CSharpAppResourcePromiseImpl(this._publishAsDockerFileInternal(configure), this._client); } @@ -10905,7 +10905,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise { - let helpLink = options?.helpLink; + const helpLink = options?.helpLink; return new CSharpAppResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -11072,9 +11072,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new CSharpAppResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -11145,14 +11145,14 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): CSharpAppResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let scheme = options?.scheme; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; - let isExternal = options?.isExternal; - let protocol = options?.protocol; + const port = options?.port; + const targetPort = options?.targetPort; + const scheme = options?.scheme; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; + const isExternal = options?.isExternal; + const protocol = options?.protocol; return new CSharpAppResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -11173,11 +11173,11 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): CSharpAppResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new CSharpAppResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -11198,11 +11198,11 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): CSharpAppResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new CSharpAppResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -11278,7 +11278,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): CSharpAppResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new CSharpAppResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } @@ -11296,7 +11296,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new CSharpAppResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -11463,7 +11463,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new CSharpAppResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -11497,9 +11497,9 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): CSharpAppResourcePromise { - let path = options?.path; - let statusCode = options?.statusCode; - let endpointName = options?.endpointName; + const path = options?.path; + const statusCode = options?.statusCode; + const endpointName = options?.endpointName; return new CSharpAppResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -11521,7 +11521,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new CSharpAppResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -11633,7 +11633,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise { - let iconVariant = options?.iconVariant; + const iconVariant = options?.iconVariant; return new CSharpAppResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -11656,13 +11656,13 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): CSharpAppResourcePromise { - let path = options?.path; - let initialDelaySeconds = options?.initialDelaySeconds; - let periodSeconds = options?.periodSeconds; - let timeoutSeconds = options?.timeoutSeconds; - let failureThreshold = options?.failureThreshold; - let successThreshold = options?.successThreshold; - let endpointName = options?.endpointName; + const path = options?.path; + const initialDelaySeconds = options?.initialDelaySeconds; + const periodSeconds = options?.periodSeconds; + const timeoutSeconds = options?.timeoutSeconds; + const failureThreshold = options?.failureThreshold; + const successThreshold = options?.successThreshold; + const endpointName = options?.endpointName; return new CSharpAppResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -11732,10 +11732,10 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): CSharpAppResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new CSharpAppResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -11882,8 +11882,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): CSharpAppResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new CSharpAppResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -11985,7 +11985,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): CSharpAppResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new CSharpAppResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -12210,8 +12210,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): CSharpAppResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new CSharpAppResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -12229,8 +12229,8 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): CSharpAppResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new CSharpAppResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -12961,8 +12961,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): DotnetToolResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new DotnetToolResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -13423,14 +13423,14 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): DotnetToolResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new DotnetToolResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -13759,9 +13759,9 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): DotnetToolResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new DotnetToolResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -13895,7 +13895,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): DotnetToolResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new DotnetToolResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -14144,8 +14144,8 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ExecutableResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new ExecutableResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -15613,14 +15613,14 @@ class ExecutableResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ExecutableResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new ExecutableResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -15949,9 +15949,9 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ExecutableResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ExecutableResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -16085,7 +16085,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ExecutableResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ExecutableResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -16334,8 +16334,8 @@ class ExecutableResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): ExternalServiceResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ExternalServiceResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -17546,7 +17546,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): ExternalServiceResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ExternalServiceResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -17716,8 +17716,8 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise { - let buildImage = options?.buildImage; - let runtimeImage = options?.runtimeImage; + const buildImage = options?.buildImage; + const runtimeImage = options?.runtimeImage; return new ParameterResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -18467,7 +18467,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets a parameter description */ withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise { - let enableMarkdown = options?.enableMarkdown; + const enableMarkdown = options?.enableMarkdown; return new ParameterResourcePromiseImpl(this._withDescriptionInternal(description, enableMarkdown), this._client); } @@ -18484,7 +18484,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise { - let helpLink = options?.helpLink; + const helpLink = options?.helpLink; return new ParameterResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -18521,7 +18521,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ParameterResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ParameterResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } @@ -18539,7 +18539,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ParameterResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ParameterResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -18625,7 +18625,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ParameterResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -18674,7 +18674,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise { - let iconVariant = options?.iconVariant; + const iconVariant = options?.iconVariant; return new ParameterResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -18714,10 +18714,10 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ParameterResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ParameterResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -18844,8 +18844,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ParameterResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new ParameterResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -18927,7 +18927,7 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ParameterResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new ParameterResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -19137,8 +19137,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ParameterResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ParameterResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -19156,8 +19156,8 @@ class ParameterResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ParameterResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ParameterResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -19659,8 +19659,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise { - let buildImage = options?.buildImage; - let runtimeImage = options?.runtimeImage; + const buildImage = options?.buildImage; + const runtimeImage = options?.runtimeImage; return new ProjectResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -19678,8 +19678,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise { - let path = options?.path; - let endpointName = options?.endpointName; + const path = options?.path; + const endpointName = options?.endpointName; return new ProjectResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -19761,7 +19761,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Publishes a project as a Docker file with optional container configuration */ publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise { - let configure = options?.configure; + const configure = options?.configure; return new ProjectResourcePromiseImpl(this._publishAsDockerFileInternal(configure), this._client); } @@ -19778,7 +19778,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise { - let helpLink = options?.helpLink; + const helpLink = options?.helpLink; return new ProjectResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -19945,9 +19945,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new ProjectResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -20018,14 +20018,14 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): ProjectResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let scheme = options?.scheme; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; - let isExternal = options?.isExternal; - let protocol = options?.protocol; + const port = options?.port; + const targetPort = options?.targetPort; + const scheme = options?.scheme; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; + const isExternal = options?.isExternal; + const protocol = options?.protocol; return new ProjectResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -20046,11 +20046,11 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): ProjectResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new ProjectResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -20071,11 +20071,11 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): ProjectResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new ProjectResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -20151,7 +20151,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ProjectResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ProjectResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } @@ -20169,7 +20169,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ProjectResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -20336,7 +20336,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new ProjectResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -20370,9 +20370,9 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ProjectResourcePromise { - let path = options?.path; - let statusCode = options?.statusCode; - let endpointName = options?.endpointName; + const path = options?.path; + const statusCode = options?.statusCode; + const endpointName = options?.endpointName; return new ProjectResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -20394,7 +20394,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ProjectResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -20506,7 +20506,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise { - let iconVariant = options?.iconVariant; + const iconVariant = options?.iconVariant; return new ProjectResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -20529,13 +20529,13 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ProjectResourcePromise { - let path = options?.path; - let initialDelaySeconds = options?.initialDelaySeconds; - let periodSeconds = options?.periodSeconds; - let timeoutSeconds = options?.timeoutSeconds; - let failureThreshold = options?.failureThreshold; - let successThreshold = options?.successThreshold; - let endpointName = options?.endpointName; + const path = options?.path; + const initialDelaySeconds = options?.initialDelaySeconds; + const periodSeconds = options?.periodSeconds; + const timeoutSeconds = options?.timeoutSeconds; + const failureThreshold = options?.failureThreshold; + const successThreshold = options?.successThreshold; + const endpointName = options?.endpointName; return new ProjectResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -20605,10 +20605,10 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ProjectResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ProjectResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -20755,8 +20755,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ProjectResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new ProjectResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -20858,7 +20858,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ProjectResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new ProjectResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -21083,8 +21083,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ProjectResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ProjectResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -21102,8 +21102,8 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ProjectResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ProjectResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -21849,7 +21849,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): TestDatabaseResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new TestDatabaseResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -22422,14 +22422,14 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new TestDatabaseResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -22758,9 +22758,9 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise, options?: WithCommandOptions): TestDatabaseResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new TestDatabaseResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -22894,7 +22894,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase Promise, options?: WithPipelineStepFactoryOptions): TestDatabaseResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new TestDatabaseResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -23034,8 +23034,8 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise { - let isReadOnly = options?.isReadOnly; + const isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } @@ -24420,7 +24420,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestRedisResourcePromise { - let tag = options?.tag; + const tag = options?.tag; return new TestRedisResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } @@ -24513,8 +24513,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise { - let dockerfilePath = options?.dockerfilePath; - let stage = options?.stage; + const dockerfilePath = options?.dockerfilePath; + const stage = options?.stage; return new TestRedisResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } @@ -24594,8 +24594,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise { - let buildImage = options?.buildImage; - let runtimeImage = options?.runtimeImage; + const buildImage = options?.buildImage; + const runtimeImage = options?.runtimeImage; return new TestRedisResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -24628,8 +24628,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): TestRedisResourcePromise { - let path = options?.path; - let endpointName = options?.endpointName; + const path = options?.path; + const endpointName = options?.endpointName; return new TestRedisResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -24691,7 +24691,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise { - let helpLink = options?.helpLink; + const helpLink = options?.helpLink; return new TestRedisResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -24889,9 +24889,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new TestRedisResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -24971,14 +24971,14 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): TestRedisResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let scheme = options?.scheme; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; - let isExternal = options?.isExternal; - let protocol = options?.protocol; + const port = options?.port; + const targetPort = options?.targetPort; + const scheme = options?.scheme; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; + const isExternal = options?.isExternal; + const protocol = options?.protocol; return new TestRedisResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -24999,11 +24999,11 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): TestRedisResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new TestRedisResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -25024,11 +25024,11 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestRedisResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new TestRedisResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -25104,7 +25104,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestRedisResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new TestRedisResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } @@ -25122,7 +25122,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestRedisResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new TestRedisResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -25273,7 +25273,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new TestRedisResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -25307,9 +25307,9 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestRedisResourcePromise { - let path = options?.path; - let statusCode = options?.statusCode; - let endpointName = options?.endpointName; + const path = options?.path; + const statusCode = options?.statusCode; + const endpointName = options?.endpointName; return new TestRedisResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -25331,7 +25331,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new TestRedisResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -25443,7 +25443,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise { - let iconVariant = options?.iconVariant; + const iconVariant = options?.iconVariant; return new TestRedisResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -25466,13 +25466,13 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestRedisResourcePromise { - let path = options?.path; - let initialDelaySeconds = options?.initialDelaySeconds; - let periodSeconds = options?.periodSeconds; - let timeoutSeconds = options?.timeoutSeconds; - let failureThreshold = options?.failureThreshold; - let successThreshold = options?.successThreshold; - let endpointName = options?.endpointName; + const path = options?.path; + const initialDelaySeconds = options?.initialDelaySeconds; + const periodSeconds = options?.periodSeconds; + const timeoutSeconds = options?.timeoutSeconds; + const failureThreshold = options?.failureThreshold; + const successThreshold = options?.successThreshold; + const endpointName = options?.endpointName; return new TestRedisResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -25542,10 +25542,10 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): TestRedisResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new TestRedisResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -25583,8 +25583,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): TestRedisResourcePromise { - let name = options?.name; - let isReadOnly = options?.isReadOnly; + const name = options?.name; + const isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } @@ -25730,7 +25730,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a child database to a test Redis resource */ addTestChildDatabase(name: string, options?: AddTestChildDatabaseOptions): TestDatabaseResourcePromise { - let databaseName = options?.databaseName; + const databaseName = options?.databaseName; return new TestDatabaseResourcePromiseImpl(this._addTestChildDatabaseInternal(name, databaseName), this._client); } @@ -25747,7 +25747,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures the Redis resource with persistence */ withPersistence(options?: WithPersistenceOptions): TestRedisResourcePromise { - let mode = options?.mode; + const mode = options?.mode; return new TestRedisResourcePromiseImpl(this._withPersistenceInternal(mode), this._client); } @@ -25765,8 +25765,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestRedisResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new TestRedisResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -25902,7 +25902,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestRedisResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new TestRedisResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -26075,7 +26075,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Gets the status of the resource asynchronously */ async getStatusAsync(options?: GetStatusAsyncOptions): Promise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -26105,7 +26105,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Waits for the resource to be ready */ async waitForReadyAsync(timeout: number, options?: WaitForReadyAsyncOptions): Promise { - let cancellationToken = options?.cancellationToken; + const cancellationToken = options?.cancellationToken; const rpcArgs: Record = { builder: this._handle, timeout }; if (cancellationToken !== undefined) rpcArgs.cancellationToken = CancellationToken.fromValue(cancellationToken); return await this._client.invokeCapability( @@ -26150,8 +26150,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Adds a data volume with persistence */ withDataVolume(options?: WithDataVolumeOptions): TestRedisResourcePromise { - let name = options?.name; - let isReadOnly = options?.isReadOnly; + const name = options?.name; + const isReadOnly = options?.isReadOnly; return new TestRedisResourcePromiseImpl(this._withDataVolumeInternal(name, isReadOnly), this._client); } @@ -26229,8 +26229,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestRedisResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -26248,8 +26248,8 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestRedisResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestRedisResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -27147,7 +27147,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a bind mount */ withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise { - let isReadOnly = options?.isReadOnly; + const isReadOnly = options?.isReadOnly; return new TestVaultResourcePromiseImpl(this._withBindMountInternal(source, target, isReadOnly), this._client); } @@ -27209,7 +27209,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the container image */ withImage(image: string, options?: WithImageOptions): TestVaultResourcePromise { - let tag = options?.tag; + const tag = options?.tag; return new TestVaultResourcePromiseImpl(this._withImageInternal(image, tag), this._client); } @@ -27302,8 +27302,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures the resource to use a Dockerfile */ withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise { - let dockerfilePath = options?.dockerfilePath; - let stage = options?.stage; + const dockerfilePath = options?.dockerfilePath; + const stage = options?.stage; return new TestVaultResourcePromiseImpl(this._withDockerfileInternal(contextPath, dockerfilePath, stage), this._client); } @@ -27383,8 +27383,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise { - let buildImage = options?.buildImage; - let runtimeImage = options?.runtimeImage; + const buildImage = options?.buildImage; + const runtimeImage = options?.runtimeImage; return new TestVaultResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -27417,8 +27417,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures an MCP server endpoint on the resource */ withMcpServer(options?: WithMcpServerOptions): TestVaultResourcePromise { - let path = options?.path; - let endpointName = options?.endpointName; + const path = options?.path; + const endpointName = options?.endpointName; return new TestVaultResourcePromiseImpl(this._withMcpServerInternal(path, endpointName), this._client); } @@ -27480,7 +27480,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise { - let helpLink = options?.helpLink; + const helpLink = options?.helpLink; return new TestVaultResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -27647,9 +27647,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a reference to another resource */ withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new TestVaultResourcePromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -27720,14 +27720,14 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a network endpoint */ withEndpoint(options?: WithEndpointOptions): TestVaultResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let scheme = options?.scheme; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; - let isExternal = options?.isExternal; - let protocol = options?.protocol; + const port = options?.port; + const targetPort = options?.targetPort; + const scheme = options?.scheme; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; + const isExternal = options?.isExternal; + const protocol = options?.protocol; return new TestVaultResourcePromiseImpl(this._withEndpointInternal(port, targetPort, scheme, name, env, isProxied, isExternal, protocol), this._client); } @@ -27748,11 +27748,11 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTP endpoint */ withHttpEndpoint(options?: WithHttpEndpointOptions): TestVaultResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new TestVaultResourcePromiseImpl(this._withHttpEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -27773,11 +27773,11 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTPS endpoint */ withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestVaultResourcePromise { - let port = options?.port; - let targetPort = options?.targetPort; - let name = options?.name; - let env = options?.env; - let isProxied = options?.isProxied; + const port = options?.port; + const targetPort = options?.targetPort; + const name = options?.name; + const env = options?.env; + const isProxied = options?.isProxied; return new TestVaultResourcePromiseImpl(this._withHttpsEndpointInternal(port, targetPort, name, env, isProxied), this._client); } @@ -27853,7 +27853,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): TestVaultResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new TestVaultResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } @@ -27871,7 +27871,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): TestVaultResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new TestVaultResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -28022,7 +28022,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Waits for resource completion */ waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new TestVaultResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -28056,9 +28056,9 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTP health check */ withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestVaultResourcePromise { - let path = options?.path; - let statusCode = options?.statusCode; - let endpointName = options?.endpointName; + const path = options?.path; + const statusCode = options?.statusCode; + const endpointName = options?.endpointName; return new TestVaultResourcePromiseImpl(this._withHttpHealthCheckInternal(path, statusCode, endpointName), this._client); } @@ -28080,7 +28080,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new TestVaultResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -28192,7 +28192,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise { - let iconVariant = options?.iconVariant; + const iconVariant = options?.iconVariant; return new TestVaultResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -28215,13 +28215,13 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an HTTP health probe to the resource */ withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestVaultResourcePromise { - let path = options?.path; - let initialDelaySeconds = options?.initialDelaySeconds; - let periodSeconds = options?.periodSeconds; - let timeoutSeconds = options?.timeoutSeconds; - let failureThreshold = options?.failureThreshold; - let successThreshold = options?.successThreshold; - let endpointName = options?.endpointName; + const path = options?.path; + const initialDelaySeconds = options?.initialDelaySeconds; + const periodSeconds = options?.periodSeconds; + const timeoutSeconds = options?.timeoutSeconds; + const failureThreshold = options?.failureThreshold; + const successThreshold = options?.successThreshold; + const endpointName = options?.endpointName; return new TestVaultResourcePromiseImpl(this._withHttpProbeInternal(probeType, path, initialDelaySeconds, periodSeconds, timeoutSeconds, failureThreshold, successThreshold, endpointName), this._client); } @@ -28291,10 +28291,10 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): TestVaultResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new TestVaultResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -28332,8 +28332,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds a volume */ withVolume(target: string, options?: WithVolumeOptions): TestVaultResourcePromise { - let name = options?.name; - let isReadOnly = options?.isReadOnly; + const name = options?.name; + const isReadOnly = options?.isReadOnly; return new TestVaultResourcePromiseImpl(this._withVolumeInternal(target, name, isReadOnly), this._client); } @@ -28460,8 +28460,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): TestVaultResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new TestVaultResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -28563,7 +28563,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): TestVaultResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new TestVaultResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -28803,8 +28803,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): TestVaultResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -28822,8 +28822,8 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): TestVaultResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new TestVaultResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -29682,8 +29682,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the base image for a Dockerfile build */ withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise { - let buildImage = options?.buildImage; - let runtimeImage = options?.runtimeImage; + const buildImage = options?.buildImage; + const runtimeImage = options?.runtimeImage; return new ResourcePromiseImpl(this._withDockerfileBaseImageInternal(buildImage, runtimeImage), this._client); } @@ -29700,7 +29700,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a required command dependency */ withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise { - let helpLink = options?.helpLink; + const helpLink = options?.helpLink; return new ResourcePromiseImpl(this._withRequiredCommandInternal(command, helpLink), this._client); } @@ -29737,7 +29737,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds or modifies displayed URLs */ withUrl(url: string, options?: WithUrlOptions): ResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ResourcePromiseImpl(this._withUrlInternal(url, displayText), this._client); } @@ -29755,7 +29755,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a URL using a reference expression */ withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ResourcePromise { - let displayText = options?.displayText; + const displayText = options?.displayText; return new ResourcePromiseImpl(this._withUrlExpressionInternal(url, displayText), this._client); } @@ -29841,7 +29841,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a resource command */ withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise { - let commandOptions = options?.commandOptions; + const commandOptions = options?.commandOptions; return new ResourcePromiseImpl(this._withCommandInternal(name, displayName, executeCommand, commandOptions), this._client); } @@ -29890,7 +29890,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Sets the icon for the resource */ withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise { - let iconVariant = options?.iconVariant; + const iconVariant = options?.iconVariant; return new ResourcePromiseImpl(this._withIconNameInternal(iconName, iconVariant), this._client); } @@ -29930,10 +29930,10 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds a pipeline step to the resource */ withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ResourcePromise { - let dependsOn = options?.dependsOn; - let requiredBy = options?.requiredBy; - let tags = options?.tags; - let description = options?.description; + const dependsOn = options?.dependsOn; + const requiredBy = options?.requiredBy; + const tags = options?.tags; + const description = options?.description; return new ResourcePromiseImpl(this._withPipelineStepFactoryInternal(stepName, callback, dependsOn, requiredBy, tags, description), this._client); } @@ -30060,8 +30060,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Adds an optional string parameter */ withOptionalString(options?: WithOptionalStringOptions): ResourcePromise { - let value = options?.value; - let enabled = options?.enabled; + const value = options?.value; + const enabled = options?.enabled; return new ResourcePromiseImpl(this._withOptionalStringInternal(value, enabled), this._client); } @@ -30143,7 +30143,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures with optional callback */ withOptionalCallback(options?: WithOptionalCallbackOptions): ResourcePromise { - let callback = options?.callback; + const callback = options?.callback; return new ResourcePromiseImpl(this._withOptionalCallbackInternal(callback), this._client); } @@ -30353,8 +30353,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging */ withMergeLogging(logLevel: string, options?: WithMergeLoggingOptions): ResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingInternal(logLevel, enableConsole, maxFiles), this._client); } @@ -30372,8 +30372,8 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** Configures resource logging with file path */ withMergeLoggingPath(logLevel: string, logPath: string, options?: WithMergeLoggingPathOptions): ResourcePromise { - let enableConsole = options?.enableConsole; - let maxFiles = options?.maxFiles; + const enableConsole = options?.enableConsole; + const maxFiles = options?.maxFiles; return new ResourcePromiseImpl(this._withMergeLoggingPathInternal(logLevel, logPath, enableConsole, maxFiles), this._client); } @@ -31053,8 +31053,8 @@ class ResourceWithEndpointsImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { - let connectionName = options?.connectionName; - let optional = options?.optional; - let name = options?.name; + const connectionName = options?.connectionName; + const optional = options?.optional; + const name = options?.name; return new ResourceWithEnvironmentPromiseImpl(this._withReferenceInternal(source, connectionName, optional, name), this._client); } @@ -31940,7 +31940,7 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { - let exitCode = options?.exitCode; + const exitCode = options?.exitCode; return new ResourceWithWaitSupportPromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } From eb92d04cb2a1349d0351be4d63795109e5329626 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 10:50:56 -0700 Subject: [PATCH 06/13] Add generated output examples to codegen method documentation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AtsTypeScriptCodeGenerator.cs | 239 +++++++++++++++++- 1 file changed, 226 insertions(+), 13 deletions(-) diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index 711a3c385e2..2dd66158336 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -267,6 +267,23 @@ private static string GetDtoInterfaceName(string typeId) /// For interface handle types, generated APIs accept any handle-bearing wrapper instance. /// For cancellation tokens, generated APIs accept either an AbortSignal or a transport-safe CancellationToken. /// + /// + /// Handle types are widened to accept PromiseLike so callers can pass un-awaited + /// fluent chains directly. Examples: + /// + /// // Input: RedisResource handle type + /// // Output: "RedisResource | PromiseLike<RedisResource>" + /// + /// // Input: Union of string | RedisResource + /// // Output: "string | RedisResource | PromiseLike<RedisResource>" + /// + /// // Input: CancellationToken type + /// // Output: "AbortSignal | CancellationToken" + /// + /// // Input: plain string type + /// // Output: "string" + /// + /// private string MapInputTypeToTypeScript(AtsTypeRef? typeRef) { if (typeRef?.Category == AtsTypeCategory.Union) @@ -1375,6 +1392,30 @@ private void GenerateBuilderClass(BuilderModel builder) GenerateThenableClass(builder); } + /// + /// Generates both an internal async method and a public fluent method for a builder capability. + /// + /// + /// Produces a pair of methods: a private _*Internal method that performs the RPC call, + /// and a public method that wraps it in a thenable promise class for fluent chaining. + /// Generated TypeScript (example for withEnvironment on RedisResource): + /// + /// /** @internal */ + /// private async _withEnvironmentInternal(name: string, value: string): Promise<RedisResource> { + /// await this._client.flushPendingPromises(); // only emitted for build() + /// const rpcArgs: Record<string, unknown> = { builder: this._handle, name, value }; + /// const result = await this._client.invokeCapability<RedisResourceHandle>('...', rpcArgs); + /// return new RedisResourceImpl(result, this._client); + /// } + /// + /// withEnvironment(name: string, value: string): RedisResourcePromise { + /// return new RedisResourcePromiseImpl( + /// this._withEnvironmentInternal(name, value), this._client); + /// } + /// + /// When a parameter is a handle type, promise resolution is emitted before the RPC args + /// (e.g. db = isPromiseLike(db) ? await db : db;). + /// private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capability) { var methodName = capability.MethodName; @@ -1448,7 +1489,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Handle callback registration if any @@ -1541,7 +1582,7 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Extract optional params from options object and forward to internal method foreach (var param in optionalParams) { - WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Forward all params to internal method @@ -1556,6 +1597,16 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab /// /// Generates promise resolution code for handle-type parameters that may be PromiseLike. /// + /// + /// For each parameter whose type is a handle (or union containing handles), emits a line + /// that awaits it if it is a PromiseLike. Non-handle and callback parameters are skipped. + /// + /// // For a handle-type param 'db': + /// db = isPromiseLike(db) ? await db : db; + /// + /// // For a non-handle param 'name' (string): nothing emitted + /// + /// private void GeneratePromiseResolution(IReadOnlyList parameters, string indent = " ") { foreach (var param in parameters) @@ -1565,7 +1616,7 @@ private void GeneratePromiseResolution(IReadOnlyList parameter continue; } - if (IsHandleOrHandleUnionType(param.Type)) + if (IsWidenedHandleType(param.Type)) { WriteLine($"{indent}{param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); } @@ -1575,9 +1626,16 @@ private void GeneratePromiseResolution(IReadOnlyList parameter /// /// Generates promise resolution for a single named parameter. /// + /// + /// Used for property setters where only the value parameter needs resolution. + /// + /// // For a handle-type 'value' parameter: + /// value = isPromiseLike(value) ? await value : value; + /// + /// private void GeneratePromiseResolutionForParam(string paramName, AtsTypeRef? paramType, string indent = " ") { - if (IsHandleOrHandleUnionType(paramType)) + if (IsWidenedHandleType(paramType)) { WriteLine($"{indent}{paramName} = isPromiseLike({paramName}) ? await {paramName} : {paramName};"); } @@ -1586,7 +1644,7 @@ private void GeneratePromiseResolutionForParam(string paramName, AtsTypeRef? par /// /// Checks if a type is a handle type or a union containing handle types. /// - private static bool IsHandleOrHandleUnionType(AtsTypeRef? typeRef) + private static bool IsWidenedHandleType(AtsTypeRef? typeRef) { if (typeRef == null) { @@ -1600,7 +1658,7 @@ private static bool IsHandleOrHandleUnionType(AtsTypeRef? typeRef) if (typeRef.Category == AtsTypeCategory.Union && typeRef.UnionTypes is { Count: > 0 }) { - return typeRef.UnionTypes.Any(IsHandleOrHandleUnionType); + return typeRef.UnionTypes.Any(IsWidenedHandleType); } return false; @@ -1610,6 +1668,17 @@ private static bool IsHandleOrHandleUnionType(AtsTypeRef? typeRef) /// Generates promise resolution and args object construction in one step. /// This is the unified helper used by builder methods, type class methods, context methods, and wrapper methods. /// + /// + /// Combines with RPC args construction. + /// Required parameters are inlined in the object literal; optional parameters + /// are added conditionally. + /// + /// // Example output for a method with required 'name', handle-type 'db', and optional 'timeout': + /// db = isPromiseLike(db) ? await db : db; + /// const rpcArgs: Record<string, unknown> = { builder: this._handle, name, db }; + /// if (timeout !== undefined) rpcArgs.timeout = timeout; + /// + /// private void GenerateResolveAndBuildArgs( string targetParamName, IReadOnlyList allParams, @@ -1662,6 +1731,28 @@ private void GenerateArgsObjectWithConditionals( } } + /// + /// Generates a thenable wrapper class for a builder that enables fluent chaining. + /// + /// + /// The generated class implements both PromiseLike (via then()) and + /// all fluent methods of the builder, forwarding each call through the inner promise. + /// Generated TypeScript (example for RedisResource): + /// + /// class RedisResourcePromiseImpl implements RedisResourcePromise { + /// constructor(private _promise: Promise<RedisResource>, private _client: AspireClientRpc) { + /// _client.trackPromise(_promise); + /// } + /// then<T1, T2>(...): PromiseLike<T1 | T2> { + /// return this._promise.then(...); + /// } + /// withEnvironment(name: string, value: string): RedisResourcePromise { + /// return new RedisResourcePromiseImpl( + /// this._promise.then(obj => obj.withEnvironment(name, value)), this._client); + /// } + /// } + /// + /// private void GenerateThenableClass(BuilderModel builder) { var capabilities = builder.Capabilities.Where(c => @@ -1802,6 +1893,25 @@ private void GenerateAspireClient(List entryPoints) } } + /// + /// Generates an exported entry-point function that creates a builder via an async IIFE. + /// + /// + /// Entry-point functions are standalone exports (not class methods). They wrap the + /// RPC call in an async IIFE and return a thenable promise class for immediate chaining. + /// Generated TypeScript (example for createBuilder): + /// + /// export function createBuilder(client: AspireClientRpc): DistributedApplicationBuilderPromise { + /// const promise = (async () => { + /// const rpcArgs: Record<string, unknown> = { }; + /// const handle = await client.invokeCapability<DistributedApplicationBuilderHandle>( + /// 'aspire.capability.createBuilder', rpcArgs); + /// return new DistributedApplicationBuilderImpl(handle, client); + /// })(); + /// return new DistributedApplicationBuilderPromiseImpl(promise, client); + /// } + /// + /// private void GenerateEntryPointFunction(AtsCapabilityInfo capability) { var methodName = capability.MethodName; @@ -1843,7 +1953,7 @@ private void GenerateEntryPointFunction(AtsCapabilityInfo capability) // Resolve promise-like handle params foreach (var param in capability.Parameters) { - if (!param.IsCallback && IsHandleOrHandleUnionType(param.Type)) + if (!param.IsCallback && IsWidenedHandleType(param.Type)) { WriteLine($" {param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); } @@ -1878,7 +1988,7 @@ private void GenerateEntryPointFunction(AtsCapabilityInfo capability) // Resolve promise-like handle params foreach (var param in capability.Parameters) { - if (!param.IsCallback && IsHandleOrHandleUnionType(param.Type)) + if (!param.IsCallback && IsWidenedHandleType(param.Type)) { WriteLine($" {param.Name} = isPromiseLike({param.Name}) ? await {param.Name} : {param.Name};"); } @@ -2356,6 +2466,25 @@ private static string ExtractPropertyName(string methodName) /// Generates a property-like object with get and/or set methods. /// For dictionary types, generates a direct AspireDict field instead. /// + /// + /// Scalar properties produce an object with async get/set functions. + /// Dictionary and list properties delegate to AspireDict/AspireList helpers. + /// Wrapper-typed properties delegate to . + /// Generated TypeScript (example for a string property connectionString): + /// + /// connectionString = { + /// get: async (): Promise<string> => { + /// return await this._client.invokeCapability<string>( + /// 'aspire.resource.connectionString.get', { context: this._handle }); + /// }, + /// set: async (value: string | PromiseLike<string>): Promise<void> => { + /// value = isPromiseLike(value) ? await value : value; + /// await this._client.invokeCapability<void>( + /// 'aspire.resource.connectionString.set', { context: this._handle, value }); + /// } + /// }; + /// + /// private void GeneratePropertyLikeObject(string propertyName, AtsCapabilityInfo? getter, AtsCapabilityInfo? setter) { // Determine the return type from getter @@ -2443,6 +2572,26 @@ private void GeneratePropertyLikeObject(string propertyName, AtsCapabilityInfo? /// /// Generates a property-like object that returns a wrapper class. /// + /// + /// Similar to but the getter returns a wrapper + /// class instance instead of a scalar value. The RPC result is a handle that gets + /// wrapped in the implementation class. + /// + /// // Example: a property 'primaryEndpoint' returning EndpointReference + /// primaryEndpoint = { + /// get: async (): Promise<EndpointReference> => { + /// const handle = await this._client.invokeCapability<EndpointReferenceHandle>( + /// 'aspire.resource.primaryEndpoint.get', { context: this._handle }); + /// return new EndpointReferenceImpl(handle, this._client); + /// }, + /// set: async (value: EndpointReference | PromiseLike<EndpointReference>): Promise<void> => { + /// value = isPromiseLike(value) ? await value : value; + /// await this._client.invokeCapability<void>( + /// 'aspire.resource.primaryEndpoint.set', { context: this._handle, value }); + /// } + /// }; + /// + /// private void GenerateWrapperPropertyObject(string propertyName, AtsCapabilityInfo getter, AtsCapabilityInfo? setter, string wrapperClassName) { var handleType = GetHandleTypeName(getter.ReturnType!.TypeId); @@ -2584,6 +2733,19 @@ private void GenerateListProperty(string propertyName, AtsCapabilityInfo getter) /// /// Generates a context instance method (from ExposeMethods=true). /// + /// + /// Context methods are async methods on wrapper classes that pass this._handle + /// as the context argument. They use for parameter + /// handling. + /// Generated TypeScript (example for getEndpoint on PostgresResource): + /// + /// async getEndpoint(name: string): Promise<EndpointReference> { + /// const rpcArgs: Record<string, unknown> = { context: this._handle, name }; + /// return await this._client.invokeCapability<EndpointReference>( + /// 'aspire.resource.getEndpoint', rpcArgs); + /// } + /// + /// private void GenerateContextMethod(AtsCapabilityInfo method) { // Use OwningTypeName if available to extract method name, otherwise parse from MethodName @@ -2629,7 +2791,7 @@ private void GenerateContextMethod(AtsCapabilityInfo method) // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Resolve promise-like params and build args @@ -2664,6 +2826,18 @@ private void GenerateContextMethod(AtsCapabilityInfo method) /// /// Generates a method on a wrapper class. /// + /// + /// Similar to but designed for wrapper classes + /// that expose RPC methods without the thenable/fluent pattern. + /// Generated TypeScript (example for getExpression on EndpointReference): + /// + /// async getExpression(name: string): Promise<string> { + /// const rpcArgs: Record<string, unknown> = { builder: this._handle, name }; + /// return await this._client.invokeCapability<string>( + /// 'aspire.endpoint.getExpression', rpcArgs); + /// } + /// + /// private void GenerateWrapperMethod(AtsCapabilityInfo capability) { var methodName = GetTypeScriptMethodName(capability.MethodName); @@ -2706,7 +2880,7 @@ private void GenerateWrapperMethod(AtsCapabilityInfo capability) // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Resolve promise-like params and build args @@ -2731,6 +2905,26 @@ private void GenerateWrapperMethod(AtsCapabilityInfo capability) /// Generates a method on a type class using the thenable pattern. /// Generates both an internal async method and a public fluent method. /// + /// + /// Follows the same internal/public pair pattern as + /// but operates on type classes (resources exposed via ExposeMethods). + /// Generated TypeScript (example for withEnvironment on PostgresResource): + /// + /// /** @internal */ + /// async _withEnvironmentInternal(name: string, value: string): Promise<PostgresResource> { + /// const rpcArgs: Record<string, unknown> = { context: this._handle, name, value }; + /// await this._client.invokeCapability<void>('...', rpcArgs); + /// return this; + /// } + /// + /// withEnvironment(name: string, value: string): PostgresResourcePromise { + /// return new PostgresResourcePromiseImpl( + /// this._withEnvironmentInternal(name, value), this._client); + /// } + /// + /// For methods returning a different wrapper type, the internal method returns that + /// wrapper and the public method returns its promise class. + /// private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capability) { var className = DeriveClassName(model.TypeId); @@ -2828,7 +3022,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params and forward foreach (var param in optionalParams) { - WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } Write($" return new {returnPromiseImplementationClass}(this.{internalMethodName}("); @@ -2874,7 +3068,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params and forward foreach (var param in optionalParams) { - WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } Write($" return new {promiseImplementationClass}(this.{internalMethodName}("); @@ -2892,7 +3086,7 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab // Extract optional params from options object foreach (var param in optionalParams) { - WriteLine($" {(IsHandleOrHandleUnionType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); + WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } // Handle callback registration if any @@ -2931,6 +3125,25 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab /// /// Generates a thenable wrapper class for a type class. /// + /// + /// Identical in structure to but generated for + /// type classes (resources with ExposeMethods) rather than builder classes. + /// Generated TypeScript (example for PostgresResource): + /// + /// class PostgresResourcePromiseImpl implements PostgresResourcePromise { + /// constructor(private _promise: Promise<PostgresResource>, private _client: AspireClientRpc) { + /// _client.trackPromise(_promise); + /// } + /// then<T1, T2>(...): PromiseLike<T1 | T2> { + /// return this._promise.then(...); + /// } + /// withEnvironment(name: string, value: string): PostgresResourcePromise { + /// return new PostgresResourcePromiseImpl( + /// this._promise.then(obj => obj.withEnvironment(name, value)), this._client); + /// } + /// } + /// + /// private void GenerateTypeClassThenableWrapper(BuilderModel model, List methods) { var className = DeriveClassName(model.TypeId); From d82cdf204bd90ec938ffd6b7512d3c069a9cd31a Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 10:52:29 -0700 Subject: [PATCH 07/13] =?UTF-8?q?Address=20PR=20review=20feedback=20and=20?= =?UTF-8?q?fix=20var=E2=86=92const=20in=20playground?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix union type splitting: use structural AtsTypeRef approach instead of string splitting to avoid breaking PromiseLike generics - Fix potential deadlock: move flushPendingPromises to public build() wrapper (before PromiseImpl tracking) instead of inside _buildInternal - Fix promise resolution predicate: rename IsHandleOrHandleUnionType to IsWidenedHandleType to match exactly which types are widened with PromiseLike - Fix var→const in playground apphost.ts Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- playground/TypeScriptAppHost/apphost.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playground/TypeScriptAppHost/apphost.ts b/playground/TypeScriptAppHost/apphost.ts index f7f8ba58517..b7fa2419bda 100644 --- a/playground/TypeScriptAppHost/apphost.ts +++ b/playground/TypeScriptAppHost/apphost.ts @@ -10,7 +10,7 @@ console.log("Aspire TypeScript AppHost starting...\n"); // Create the distributed application builder const builder = await createBuilder(); -var ec = await builder.executionContext.get(); +const ec = await builder.executionContext.get(); const isPublishMode = await ec.isPublishMode.get(); console.log(`isRunMode: ${await ec.isRunMode.get()}`); @@ -19,7 +19,7 @@ console.log(`isPublishMode: ${isPublishMode}`); // Add Docker Compose environment for publishing await builder.addDockerComposeEnvironment("compose"); -var dir = await builder.appHostDirectory.get(); +const dir = await builder.appHostDirectory.get(); console.log(`AppHost directory: ${dir}`); // Add PostgreSQL server and database From 8a87fc0594839f9930b67b11499dce15b5e4f2e9 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 10:56:46 -0700 Subject: [PATCH 08/13] Use Awaitable utility type for cleaner generated signatures Add Awaitable = T | PromiseLike to base.ts. Generated signatures now use Awaitable instead of the verbose RedisResource | PromiseLike inline expansion. For unions: string | Awaitable instead of duplicating the full union inside PromiseLike<>. Also fixes union type construction to use structural AtsTypeRef approach instead of string splitting. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AtsTypeScriptCodeGenerator.cs | 64 +- .../Resources/base.ts | 6 + .../AtsTypeScriptCodeGeneratorTests.cs | 4 +- .../Snapshots/AtsGeneratedAspire.verified.ts | 122 +- ...TwoPassScanningGeneratedAspire.verified.ts | 2160 +++++++++-------- .../Snapshots/base.verified.ts | 6 + 6 files changed, 1194 insertions(+), 1168 deletions(-) diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index 2dd66158336..a2b0c890b40 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -268,14 +268,14 @@ private static string GetDtoInterfaceName(string typeId) /// For cancellation tokens, generated APIs accept either an AbortSignal or a transport-safe CancellationToken. /// /// - /// Handle types are widened to accept PromiseLike so callers can pass un-awaited + /// Handle types are widened to accept Awaitable<T> so callers can pass un-awaited /// fluent chains directly. Examples: /// /// // Input: RedisResource handle type - /// // Output: "RedisResource | PromiseLike<RedisResource>" + /// // Output: "Awaitable<RedisResource>" /// /// // Input: Union of string | RedisResource - /// // Output: "string | RedisResource | PromiseLike<RedisResource>" + /// // Output: "string | Awaitable<RedisResource>" /// /// // Input: CancellationToken type /// // Output: "AbortSignal | CancellationToken" @@ -295,17 +295,17 @@ private string MapInputTypeToTypeScript(AtsTypeRef? typeRef) { if (TryMapInterfaceInputTypeToTypeScript(typeRef!) is { } interfaceInputType) { - return $"{interfaceInputType} | PromiseLike<{interfaceInputType}>"; + return $"Awaitable<{interfaceInputType}>"; } var handleName = GetHandleReferenceInterfaceName(); - return $"{handleName} | PromiseLike<{handleName}>"; + return $"Awaitable<{handleName}>"; } if (IsHandleType(typeRef) && _wrapperClassNames.TryGetValue(typeRef!.TypeId, out var className)) { var ifaceName = GetInterfaceName(className); - return $"{ifaceName} | PromiseLike<{ifaceName}>"; + return $"Awaitable<{ifaceName}>"; } if (IsCancellationTokenType(typeRef)) @@ -323,27 +323,42 @@ private string MapInputUnionTypeToTypeScript(AtsTypeRef typeRef) throw new InvalidOperationException("Union input types must define at least one member type."); } - var memberTypes = typeRef.UnionTypes - .Select(MapInputTypeToTypeScript) - .SelectMany(t => t.Split(" | ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) - .Distinct() - .ToList(); + // Build union structurally: each member is mapped individually. + // Handle types become Awaitable, non-handle types pass through as-is. + var nonHandleTypes = new List(); + var handleTypeNames = new List(); + + foreach (var memberRef in typeRef.UnionTypes) + { + if (IsWidenedHandleType(memberRef)) + { + // Get the base type name without Awaitable wrapper for combining + var baseName = IsInterfaceHandleType(memberRef) && TryMapInterfaceInputTypeToTypeScript(memberRef) is { } expanded + ? expanded + : MapTypeRefToTypeScript(memberRef); + nonHandleTypes.Add(baseName); + handleTypeNames.Add(baseName); + } + else + { + nonHandleTypes.Add(MapInputTypeToTypeScript(memberRef)); + } + } - var baseTypes = memberTypes.Where(t => !t.StartsWith("PromiseLike<", StringComparison.Ordinal)).ToList(); - // Collect the handle types that had PromiseLike wrappers generated by MapInputTypeToTypeScript - var handleTypes = memberTypes - .Where(t => t.StartsWith("PromiseLike<", StringComparison.Ordinal)) - .Select(t => t["PromiseLike<".Length..^1]) // Extract inner type + var allBaseTypes = nonHandleTypes .SelectMany(t => t.Split(" | ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) - .Distinct() + .Distinct(StringComparer.Ordinal) .ToList(); - if (handleTypes.Count > 0) + if (handleTypeNames.Count > 0) { - return string.Join(" | ", baseTypes) + $" | PromiseLike<{string.Join(" | ", handleTypes)}>"; + var handleUnion = string.Join(" | ", handleTypeNames + .SelectMany(t => t.Split(" | ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) + .Distinct(StringComparer.Ordinal)); + return string.Join(" | ", allBaseTypes) + $" | Awaitable<{handleUnion}>"; } - return string.Join(" | ", baseTypes); + return string.Join(" | ", allBaseTypes); } /// @@ -356,13 +371,6 @@ private string MapParameterToTypeScript(AtsParameterInfo param) return GenerateCallbackTypeSignature(param.CallbackParameters, param.CallbackReturnType); } - if (param.Type?.Category == AtsTypeCategory.Union && param.Type.UnionTypes is { Count: > 0 }) - { - return string.Join(" | ", param.Type.UnionTypes - .SelectMany(t => MapInputTypeToTypeScript(t).Split(" | ", StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) - .Distinct(StringComparer.Ordinal)); - } - return MapInputTypeToTypeScript(param.Type); } @@ -584,6 +592,8 @@ private string GenerateAspireSdk(AtsContext context) AspireDict, AspireList } from './base.js'; + + import type { Awaitable } from './base.js'; """); WriteLine(); diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/base.ts b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/base.ts index 8d7033494fb..219eee04175 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/base.ts +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/base.ts @@ -7,6 +7,12 @@ export { Handle, AspireClient, CapabilityError, CancellationToken, registerCallb export type { MarshalledHandle, AtsError, AtsErrorDetails, CallbackFunction } from './transport.js'; export { AtsErrorCodes, isMarshalledHandle, isAtsError, wrapIfHandle } from './transport.js'; +/** + * Utility type for parameters that accept either a resolved value or a promise of that value. + * Used by generated APIs to allow passing un-awaited resource builders directly. + */ +export type Awaitable = T | PromiseLike; + // ============================================================================ // Reference Expression // ============================================================================ diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs index 9816c41a3df..53a7dea12c1 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/AtsTypeScriptCodeGeneratorTests.cs @@ -591,7 +591,7 @@ public void Pattern4_InterfaceParameterType_GeneratesUnionType() var files = _generator.GenerateDistributedApplication(atsContext); var aspireTs = files["aspire.ts"]; - Assert.Contains("withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike)", aspireTs); + Assert.Contains("withDependency(dependency: Awaitable)", aspireTs); Assert.DoesNotContain("withDependency(dependency: HandleReference)", aspireTs); } @@ -603,7 +603,7 @@ public void AspireUnion_InterfaceHandleInput_GeneratesExpandedUnion() var files = _generator.GenerateDistributedApplication(atsContext); var aspireTs = files["aspire.ts"]; - Assert.Contains("withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike)", aspireTs); + Assert.Contains("withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable)", aspireTs); } [Fact] diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts index fd96cda689a..f1c17096d3a 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts @@ -28,6 +28,8 @@ import { AspireList } from './base.js'; +import type { Awaitable } from './base.js'; + // ============================================================================ // Handle Type Aliases (Internal - not exported to users) // ============================================================================ @@ -626,9 +628,9 @@ export interface TestDatabaseResource { withStatus(status: TestResourceStatus): TestDatabaseResourcePromise; withNestedConfig(config: TestNestedDto): TestDatabaseResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise; + withDependency(dependency: Awaitable): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -654,9 +656,9 @@ export interface TestDatabaseResourcePromise extends PromiseLike Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise; + withDependency(dependency: Awaitable): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -852,7 +854,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -863,12 +865,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -879,12 +881,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withDependency(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -895,7 +897,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -1163,17 +1165,17 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + withDependency(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -1260,12 +1262,12 @@ export interface TestRedisResource { withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + testWaitFor(dependency: Awaitable): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withDependency(dependency: Awaitable): TestRedisResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -1299,12 +1301,12 @@ export interface TestRedisResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + testWaitFor(dependency: Awaitable): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withDependency(dependency: Awaitable): TestRedisResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -1571,7 +1573,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -1582,7 +1584,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + testWaitFor(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } @@ -1626,7 +1628,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -1637,12 +1639,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withDependency(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -1653,7 +1655,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -1992,7 +1994,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + testWaitFor(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } @@ -2012,12 +2014,12 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withDependency(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -2114,9 +2116,9 @@ export interface TestVaultResource { withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + testWaitFor(dependency: Awaitable): TestVaultResourcePromise; + withDependency(dependency: Awaitable): TestVaultResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -2142,9 +2144,9 @@ export interface TestVaultResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + testWaitFor(dependency: Awaitable): TestVaultResourcePromise; + withDependency(dependency: Awaitable): TestVaultResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -2340,7 +2342,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -2351,12 +2353,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + testWaitFor(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -2367,12 +2369,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withDependency(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -2383,7 +2385,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -2649,17 +2651,17 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + testWaitFor(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withDependency(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -2740,9 +2742,9 @@ export interface Resource { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + testWaitFor(dependency: Awaitable): ResourcePromise; + withDependency(dependency: Awaitable): ResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -2765,9 +2767,9 @@ export interface ResourcePromise extends PromiseLike { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + testWaitFor(dependency: Awaitable): ResourcePromise; + withDependency(dependency: Awaitable): ResourcePromise; + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -2941,7 +2943,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** @internal */ - private async _testWaitForInternal(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -2952,12 +2954,12 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + testWaitFor(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -2968,12 +2970,12 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withDependency(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -2984,7 +2986,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -3215,17 +3217,17 @@ class ResourcePromiseImpl implements ResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: Resource | ResourceWithConnectionString | ResourceWithEnvironment | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + testWaitFor(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withDependency(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withUnionDependency(dependency: string | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts index f07b319ea0b..cca91cdd422 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts @@ -28,6 +28,8 @@ import { AspireList } from './base.js'; +import type { Awaitable } from './base.js'; + // ============================================================================ // Handle Type Aliases (Internal - not exported to users) // ============================================================================ @@ -457,7 +459,7 @@ export interface AddContainerRegistryFromStringOptions { } export interface AddContainerRegistryOptions { - repository?: ParameterResource | PromiseLike; + repository?: Awaitable; } export interface AddDockerfileOptions { @@ -636,7 +638,7 @@ export interface WithHttpProbeOptions { } export interface WithHttpsDeveloperCertificateOptions { - password?: ParameterResource | PromiseLike; + password?: Awaitable; } export interface WithHttpsEndpointOptions { @@ -878,11 +880,11 @@ export interface CommandLineArgsCallbackContext { }; executionContext: { get: () => Promise; - set: (value: DistributedApplicationExecutionContext | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; logger: { get: () => Promise; - set: (value: Logger | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; resource: { get: () => Promise; @@ -936,7 +938,7 @@ class CommandLineArgsCallbackContextImpl implements CommandLineArgsCallbackConte ); return new DistributedApplicationExecutionContextImpl(handle, this._client); }, - set: async (value: DistributedApplicationExecutionContext | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/CommandLineArgsCallbackContext.setExecutionContext', @@ -954,7 +956,7 @@ class CommandLineArgsCallbackContextImpl implements CommandLineArgsCallbackConte ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/CommandLineArgsCallbackContext.setLogger', @@ -1615,7 +1617,7 @@ export interface EnvironmentCallbackContext { }; logger: { get: () => Promise; - set: (value: Logger | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; resource: { get: () => Promise; @@ -1672,7 +1674,7 @@ class EnvironmentCallbackContextImpl implements EnvironmentCallbackContext { ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/EnvironmentCallbackContext.setLogger', @@ -1713,7 +1715,7 @@ export interface ExecuteCommandContext { toJSON(): MarshalledHandle; serviceProvider: { get: () => Promise; - set: (value: ServiceProvider | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; resourceName: { get: () => Promise; @@ -1725,7 +1727,7 @@ export interface ExecuteCommandContext { }; logger: { get: () => Promise; - set: (value: Logger | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; } @@ -1751,7 +1753,7 @@ class ExecuteCommandContextImpl implements ExecuteCommandContext { ); return new ServiceProviderImpl(handle, this._client); }, - set: async (value: ServiceProvider | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ExecuteCommandContext.setServiceProvider', @@ -1802,7 +1804,7 @@ class ExecuteCommandContextImpl implements ExecuteCommandContext { ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ExecuteCommandContext.setLogger', @@ -1914,7 +1916,7 @@ export interface PipelineConfigurationContext { toJSON(): MarshalledHandle; services: { get: () => Promise; - set: (value: ServiceProvider | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; steps: { get: () => Promise; @@ -1922,7 +1924,7 @@ export interface PipelineConfigurationContext { }; model: { get: () => Promise; - set: (value: DistributedApplicationModel | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; getStepsByTag(tag: string): Promise; } @@ -1953,7 +1955,7 @@ class PipelineConfigurationContextImpl implements PipelineConfigurationContext { ); return new ServiceProviderImpl(handle, this._client); }, - set: async (value: ServiceProvider | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineConfigurationContext.setServices', @@ -1987,7 +1989,7 @@ class PipelineConfigurationContextImpl implements PipelineConfigurationContext { ); return new DistributedApplicationModelImpl(handle, this._client); }, - set: async (value: DistributedApplicationModel | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineConfigurationContext.setModel', @@ -2162,7 +2164,7 @@ export interface PipelineStep { readonly tags: AspireList; resource: { get: () => Promise; - set: (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; dependsOn(stepName: string): PipelineStepPromise; requiredBy(stepName: string): PipelineStepPromise; @@ -2269,7 +2271,7 @@ class PipelineStepImpl implements PipelineStep { ); return new ResourceImpl(handle, this._client); }, - set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStep.setResource', @@ -2345,11 +2347,11 @@ export interface PipelineStepContext { toJSON(): MarshalledHandle; pipelineContext: { get: () => Promise; - set: (value: PipelineContext | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; reportingStep: { get: () => Promise; - set: (value: ReportingStep | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; model: { get: () => Promise; @@ -2393,7 +2395,7 @@ class PipelineStepContextImpl implements PipelineStepContext { ); return new PipelineContextImpl(handle, this._client); }, - set: async (value: PipelineContext | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepContext.setPipelineContext', @@ -2411,7 +2413,7 @@ class PipelineStepContextImpl implements PipelineStepContext { ); return new ReportingStepImpl(handle, this._client); }, - set: async (value: ReportingStep | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepContext.setReportingStep', @@ -2496,11 +2498,11 @@ export interface PipelineStepFactoryContext { toJSON(): MarshalledHandle; pipelineContext: { get: () => Promise; - set: (value: PipelineContext | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; resource: { get: () => Promise; - set: (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; } @@ -2526,7 +2528,7 @@ class PipelineStepFactoryContextImpl implements PipelineStepFactoryContext { ); return new PipelineContextImpl(handle, this._client); }, - set: async (value: PipelineContext | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepFactoryContext.setPipelineContext', @@ -2544,7 +2546,7 @@ class PipelineStepFactoryContextImpl implements PipelineStepFactoryContext { ); return new ResourceImpl(handle, this._client); }, - set: async (value: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.Pipelines/PipelineStepFactoryContext.setResource', @@ -2924,12 +2926,12 @@ class ResourceEndpointsAllocatedEventImpl implements ResourceEndpointsAllocatedE export interface ResourceLoggerService { toJSON(): MarshalledHandle; - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise; + completeLog(resource: Awaitable): ResourceLoggerServicePromise; completeLogByName(resourceName: string): ResourceLoggerServicePromise; } export interface ResourceLoggerServicePromise extends PromiseLike { - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise; + completeLog(resource: Awaitable): ResourceLoggerServicePromise; completeLogByName(resourceName: string): ResourceLoggerServicePromise; } @@ -2948,7 +2950,7 @@ class ResourceLoggerServiceImpl implements ResourceLoggerService { /** Completes the log stream for a resource */ /** @internal */ - async _completeLogInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + async _completeLogInternal(resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { loggerService: this._handle, resource }; await this._client.invokeCapability( @@ -2958,7 +2960,7 @@ class ResourceLoggerServiceImpl implements ResourceLoggerService { return this; } - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise { + completeLog(resource: Awaitable): ResourceLoggerServicePromise { return new ResourceLoggerServicePromiseImpl(this._completeLogInternal(resource), this._client); } @@ -2995,7 +2997,7 @@ class ResourceLoggerServicePromiseImpl implements ResourceLoggerServicePromise { } /** Completes the log stream for a resource */ - completeLog(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceLoggerServicePromise { + completeLog(resource: Awaitable): ResourceLoggerServicePromise { return new ResourceLoggerServicePromiseImpl(this._promise.then(obj => obj.completeLog(resource)), this._client); } @@ -3015,18 +3017,18 @@ export interface ResourceNotificationService { waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise; waitForResourceStates(resourceName: string, targetStates: string[]): Promise; waitForResourceHealthy(resourceName: string): Promise; - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise; + waitForDependencies(resource: Awaitable): ResourceNotificationServicePromise; tryGetResourceState(resourceName: string): Promise; - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; + publishResourceUpdate(resource: Awaitable, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; } export interface ResourceNotificationServicePromise extends PromiseLike { waitForResourceState(resourceName: string, options?: WaitForResourceStateOptions): ResourceNotificationServicePromise; waitForResourceStates(resourceName: string, targetStates: string[]): Promise; waitForResourceHealthy(resourceName: string): Promise; - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise; + waitForDependencies(resource: Awaitable): ResourceNotificationServicePromise; tryGetResourceState(resourceName: string): Promise; - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; + publishResourceUpdate(resource: Awaitable, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise; } // ============================================================================ @@ -3079,7 +3081,7 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { /** Waits for all dependencies of a resource to be ready */ /** @internal */ - async _waitForDependenciesInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + async _waitForDependenciesInternal(resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { notificationService: this._handle, resource }; await this._client.invokeCapability( @@ -3089,7 +3091,7 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { return this; } - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise { + waitForDependencies(resource: Awaitable): ResourceNotificationServicePromise { return new ResourceNotificationServicePromiseImpl(this._waitForDependenciesInternal(resource), this._client); } @@ -3104,7 +3106,7 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { /** Publishes an update for a resource's state */ /** @internal */ - async _publishResourceUpdateInternal(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, state?: string, stateStyle?: string): Promise { + async _publishResourceUpdateInternal(resource: Awaitable, state?: string, stateStyle?: string): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { notificationService: this._handle, resource }; if (state !== undefined) rpcArgs.state = state; @@ -3116,7 +3118,7 @@ class ResourceNotificationServiceImpl implements ResourceNotificationService { return this; } - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { + publishResourceUpdate(resource: Awaitable, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { const state = options?.state; const stateStyle = options?.stateStyle; return new ResourceNotificationServicePromiseImpl(this._publishResourceUpdateInternal(resource, state, stateStyle), this._client); @@ -3155,7 +3157,7 @@ class ResourceNotificationServicePromiseImpl implements ResourceNotificationServ } /** Waits for all dependencies of a resource to be ready */ - waitForDependencies(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceNotificationServicePromise { + waitForDependencies(resource: Awaitable): ResourceNotificationServicePromise { return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.waitForDependencies(resource)), this._client); } @@ -3165,7 +3167,7 @@ class ResourceNotificationServicePromiseImpl implements ResourceNotificationServ } /** Publishes an update for a resource's state */ - publishResourceUpdate(resource: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { + publishResourceUpdate(resource: Awaitable, options?: PublishResourceUpdateOptions): ResourceNotificationServicePromise { return new ResourceNotificationServicePromiseImpl(this._promise.then(obj => obj.publishResourceUpdate(resource, options)), this._client); } @@ -3288,7 +3290,7 @@ export interface ResourceUrlsCallbackContext { }; logger: { get: () => Promise; - set: (value: Logger | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; executionContext: { get: () => Promise; @@ -3353,7 +3355,7 @@ class ResourceUrlsCallbackContextImpl implements ResourceUrlsCallbackContext { ); return new LoggerImpl(handle, this._client); }, - set: async (value: Logger | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/ResourceUrlsCallbackContext.setLogger', @@ -3740,7 +3742,7 @@ export interface UpdateCommandStateContext { toJSON(): MarshalledHandle; serviceProvider: { get: () => Promise; - set: (value: ServiceProvider | PromiseLike) => Promise; + set: (value: Awaitable) => Promise; }; } @@ -3766,7 +3768,7 @@ class UpdateCommandStateContextImpl implements UpdateCommandStateContext { ); return new ServiceProviderImpl(handle, this._client); }, - set: async (value: ServiceProvider | PromiseLike): Promise => { + set: async (value: Awaitable): Promise => { value = isPromiseLike(value) ? await value : value; await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/UpdateCommandStateContext.setServiceProvider', @@ -3924,7 +3926,7 @@ export interface DistributedApplicationBuilder { build(): DistributedApplicationPromise; addConnectionStringExpression(name: string, connectionStringExpression: ReferenceExpression): ConnectionStringResourcePromise; addConnectionStringBuilder(name: string, connectionStringBuilder: (obj: ReferenceExpressionBuilder) => Promise): ConnectionStringResourcePromise; - addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; + addContainerRegistry(name: string, endpoint: Awaitable, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise; addContainer(name: string, image: string): ContainerResourcePromise; addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise; @@ -3932,7 +3934,7 @@ export interface DistributedApplicationBuilder { addExecutable(name: string, command: string, workingDirectory: string, args: string[]): ExecutableResourcePromise; addExternalService(name: string, url: string): ExternalServiceResourcePromise; addExternalServiceUri(name: string, uri: string): ExternalServiceResourcePromise; - addExternalServiceParameter(name: string, urlParameter: ParameterResource | PromiseLike): ExternalServiceResourcePromise; + addExternalServiceParameter(name: string, urlParameter: Awaitable): ExternalServiceResourcePromise; addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise; addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise; addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise; @@ -3952,7 +3954,7 @@ export interface DistributedApplicationBuilderPromise extends PromiseLike Promise): ConnectionStringResourcePromise; - addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; + addContainerRegistry(name: string, endpoint: Awaitable, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise; addContainerRegistryFromString(name: string, endpoint: string, options?: AddContainerRegistryFromStringOptions): ContainerRegistryResourcePromise; addContainer(name: string, image: string): ContainerResourcePromise; addDockerfile(name: string, contextPath: string, options?: AddDockerfileOptions): ContainerResourcePromise; @@ -3960,7 +3962,7 @@ export interface DistributedApplicationBuilderPromise extends PromiseLike): ExternalServiceResourcePromise; + addExternalServiceParameter(name: string, urlParameter: Awaitable): ExternalServiceResourcePromise; addParameter(name: string, options?: AddParameterOptions): ParameterResourcePromise; addParameterWithValue(name: string, value: string, options?: AddParameterWithValueOptions): ParameterResourcePromise; addParameterFromConfiguration(name: string, configurationKey: string, options?: AddParameterFromConfigurationOptions): ParameterResourcePromise; @@ -4096,7 +4098,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder /** Adds a container registry resource */ /** @internal */ - async _addContainerRegistryInternal(name: string, endpoint: ParameterResource | PromiseLike, repository?: ParameterResource | PromiseLike): Promise { + async _addContainerRegistryInternal(name: string, endpoint: Awaitable, repository?: Awaitable): Promise { endpoint = isPromiseLike(endpoint) ? await endpoint : endpoint; repository = isPromiseLike(repository) ? await repository : repository; const rpcArgs: Record = { builder: this._handle, name, endpoint }; @@ -4108,7 +4110,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder return new ContainerRegistryResourceImpl(result, this._client); } - addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { + addContainerRegistry(name: string, endpoint: Awaitable, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { let repository = options?.repository; return new ContainerRegistryResourcePromiseImpl(this._addContainerRegistryInternal(name, endpoint, repository), this._client); } @@ -4226,7 +4228,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder /** Adds an external service with a parameter URL */ /** @internal */ - async _addExternalServiceParameterInternal(name: string, urlParameter: ParameterResource | PromiseLike): Promise { + async _addExternalServiceParameterInternal(name: string, urlParameter: Awaitable): Promise { urlParameter = isPromiseLike(urlParameter) ? await urlParameter : urlParameter; const rpcArgs: Record = { builder: this._handle, name, urlParameter }; const result = await this._client.invokeCapability( @@ -4236,7 +4238,7 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder return new ExternalServiceResourceImpl(result, this._client); } - addExternalServiceParameter(name: string, urlParameter: ParameterResource | PromiseLike): ExternalServiceResourcePromise { + addExternalServiceParameter(name: string, urlParameter: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._addExternalServiceParameterInternal(name, urlParameter), this._client); } @@ -4488,7 +4490,7 @@ class DistributedApplicationBuilderPromiseImpl implements DistributedApplication } /** Adds a container registry resource */ - addContainerRegistry(name: string, endpoint: ParameterResource | PromiseLike, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { + addContainerRegistry(name: string, endpoint: Awaitable, options?: AddContainerRegistryOptions): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.addContainerRegistry(name, endpoint, options)), this._client); } @@ -4528,7 +4530,7 @@ class DistributedApplicationBuilderPromiseImpl implements DistributedApplication } /** Adds an external service with a parameter URL */ - addExternalServiceParameter(name: string, urlParameter: ParameterResource | PromiseLike): ExternalServiceResourcePromise { + addExternalServiceParameter(name: string, urlParameter: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.addExternalServiceParameter(name, urlParameter)), this._client); } @@ -5511,13 +5513,13 @@ export interface UserSecretsManager { }; trySetSecret(name: string, value: string): Promise; saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise; - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise; + getOrSetSecret(resourceBuilder: Awaitable, name: string, value: string): UserSecretsManagerPromise; } export interface UserSecretsManagerPromise extends PromiseLike { trySetSecret(name: string, value: string): Promise; saveStateJson(json: string, options?: SaveStateJsonOptions): UserSecretsManagerPromise; - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise; + getOrSetSecret(resourceBuilder: Awaitable, name: string, value: string): UserSecretsManagerPromise; } // ============================================================================ @@ -5581,7 +5583,7 @@ class UserSecretsManagerImpl implements UserSecretsManager { /** Gets a secret value if it exists, or sets it to the provided value if it does not */ /** @internal */ - async _getOrSetSecretInternal(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): Promise { + async _getOrSetSecretInternal(resourceBuilder: Awaitable, name: string, value: string): Promise { resourceBuilder = isPromiseLike(resourceBuilder) ? await resourceBuilder : resourceBuilder; const rpcArgs: Record = { userSecretsManager: this._handle, resourceBuilder, name, value }; await this._client.invokeCapability( @@ -5591,7 +5593,7 @@ class UserSecretsManagerImpl implements UserSecretsManager { return this; } - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise { + getOrSetSecret(resourceBuilder: Awaitable, name: string, value: string): UserSecretsManagerPromise { return new UserSecretsManagerPromiseImpl(this._getOrSetSecretInternal(resourceBuilder, name, value), this._client); } @@ -5623,7 +5625,7 @@ class UserSecretsManagerPromiseImpl implements UserSecretsManagerPromise { } /** Gets a secret value if it exists, or sets it to the provided value if it does not */ - getOrSetSecret(resourceBuilder: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, name: string, value: string): UserSecretsManagerPromise { + getOrSetSecret(resourceBuilder: Awaitable, name: string, value: string): UserSecretsManagerPromise { return new UserSecretsManagerPromiseImpl(this._promise.then(obj => obj.getOrSetSecret(resourceBuilder, name, value)), this._client); } @@ -5635,7 +5637,7 @@ class UserSecretsManagerPromiseImpl implements UserSecretsManagerPromise { export interface ConnectionStringResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + withContainerRegistry(registry: Awaitable): ConnectionStringResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ConnectionStringResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ConnectionStringResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): ConnectionStringResourcePromise; @@ -5646,16 +5648,16 @@ export interface ConnectionStringResource { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ConnectionStringResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ConnectionStringResourcePromise; excludeFromManifest(): ConnectionStringResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitFor(dependency: Awaitable): ConnectionStringResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitForStart(dependency: Awaitable): ConnectionStringResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; withExplicitStart(): ConnectionStringResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; withHealthCheck(key: string): ConnectionStringResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ConnectionStringResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + withParentRelationship(parent: Awaitable): ConnectionStringResourcePromise; + withChildRelationship(child: Awaitable): ConnectionStringResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ConnectionStringResourcePromise; excludeFromMcp(): ConnectionStringResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ConnectionStringResourcePromise; @@ -5676,10 +5678,10 @@ export interface ConnectionStringResource { withStatus(status: TestResourceStatus): ConnectionStringResourcePromise; withNestedConfig(config: TestNestedDto): ConnectionStringResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ConnectionStringResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + testWaitFor(dependency: Awaitable): ConnectionStringResourcePromise; withConnectionStringDirect(connectionString: string): ConnectionStringResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; + withDependency(dependency: Awaitable): ConnectionStringResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ConnectionStringResourcePromise; withEndpoints(endpoints: string[]): ConnectionStringResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ConnectionStringResourcePromise; withMergeLabel(label: string): ConnectionStringResourcePromise; @@ -5693,7 +5695,7 @@ export interface ConnectionStringResource { } export interface ConnectionStringResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + withContainerRegistry(registry: Awaitable): ConnectionStringResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ConnectionStringResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ConnectionStringResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): ConnectionStringResourcePromise; @@ -5704,16 +5706,16 @@ export interface ConnectionStringResourcePromise extends PromiseLike Promise): ConnectionStringResourcePromise; excludeFromManifest(): ConnectionStringResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitFor(dependency: Awaitable): ConnectionStringResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; + waitForStart(dependency: Awaitable): ConnectionStringResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise; withExplicitStart(): ConnectionStringResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ConnectionStringResourcePromise; withHealthCheck(key: string): ConnectionStringResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ConnectionStringResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + withParentRelationship(parent: Awaitable): ConnectionStringResourcePromise; + withChildRelationship(child: Awaitable): ConnectionStringResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ConnectionStringResourcePromise; excludeFromMcp(): ConnectionStringResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ConnectionStringResourcePromise; @@ -5734,10 +5736,10 @@ export interface ConnectionStringResourcePromise extends PromiseLike Promise): ConnectionStringResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise; + testWaitFor(dependency: Awaitable): ConnectionStringResourcePromise; withConnectionStringDirect(connectionString: string): ConnectionStringResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise; + withDependency(dependency: Awaitable): ConnectionStringResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ConnectionStringResourcePromise; withEndpoints(endpoints: string[]): ConnectionStringResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ConnectionStringResourcePromise; withMergeLabel(label: string): ConnectionStringResourcePromise; @@ -5760,7 +5762,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -5771,7 +5773,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + withContainerRegistry(registry: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -5941,7 +5943,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -5952,12 +5954,12 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + waitFor(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -5968,12 +5970,12 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -5984,12 +5986,12 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + waitForStart(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -6000,7 +6002,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -6020,7 +6022,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -6032,7 +6034,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { const exitCode = options?.exitCode; return new ConnectionStringResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -6075,7 +6077,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -6086,12 +6088,12 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + withParentRelationship(parent: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -6102,7 +6104,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + withChildRelationship(child: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -6463,7 +6465,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -6474,7 +6476,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + testWaitFor(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } @@ -6494,7 +6496,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -6505,12 +6507,12 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + withDependency(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -6521,7 +6523,7 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase): ConnectionStringResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -6707,7 +6709,7 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + withContainerRegistry(registry: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -6762,22 +6764,22 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + waitFor(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + waitForStart(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -6787,7 +6789,7 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -6802,12 +6804,12 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + withParentRelationship(parent: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + withChildRelationship(child: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -6912,7 +6914,7 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ConnectionStringResourcePromise { + testWaitFor(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } @@ -6922,12 +6924,12 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise { + withDependency(dependency: Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ConnectionStringResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ConnectionStringResourcePromise { return new ConnectionStringResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -6989,7 +6991,7 @@ class ConnectionStringResourcePromiseImpl implements ConnectionStringResourcePro export interface ContainerRegistryResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withContainerRegistry(registry: Awaitable): ContainerRegistryResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerRegistryResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerRegistryResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ContainerRegistryResourcePromise; @@ -7000,8 +7002,8 @@ export interface ContainerRegistryResource { withExplicitStart(): ContainerRegistryResourcePromise; withHealthCheck(key: string): ContainerRegistryResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withParentRelationship(parent: Awaitable): ContainerRegistryResourcePromise; + withChildRelationship(child: Awaitable): ContainerRegistryResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerRegistryResourcePromise; excludeFromMcp(): ContainerRegistryResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerRegistryResourcePromise; @@ -7020,9 +7022,9 @@ export interface ContainerRegistryResource { withStatus(status: TestResourceStatus): ContainerRegistryResourcePromise; withNestedConfig(config: TestNestedDto): ContainerRegistryResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ContainerRegistryResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; + testWaitFor(dependency: Awaitable): ContainerRegistryResourcePromise; + withDependency(dependency: Awaitable): ContainerRegistryResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerRegistryResourcePromise; withEndpoints(endpoints: string[]): ContainerRegistryResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerRegistryResourcePromise; withMergeLabel(label: string): ContainerRegistryResourcePromise; @@ -7036,7 +7038,7 @@ export interface ContainerRegistryResource { } export interface ContainerRegistryResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withContainerRegistry(registry: Awaitable): ContainerRegistryResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerRegistryResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerRegistryResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ContainerRegistryResourcePromise; @@ -7047,8 +7049,8 @@ export interface ContainerRegistryResourcePromise extends PromiseLike Promise, options?: WithCommandOptions): ContainerRegistryResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; + withParentRelationship(parent: Awaitable): ContainerRegistryResourcePromise; + withChildRelationship(child: Awaitable): ContainerRegistryResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerRegistryResourcePromise; excludeFromMcp(): ContainerRegistryResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ContainerRegistryResourcePromise; @@ -7067,9 +7069,9 @@ export interface ContainerRegistryResourcePromise extends PromiseLike Promise): ContainerRegistryResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise; + testWaitFor(dependency: Awaitable): ContainerRegistryResourcePromise; + withDependency(dependency: Awaitable): ContainerRegistryResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerRegistryResourcePromise; withEndpoints(endpoints: string[]): ContainerRegistryResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerRegistryResourcePromise; withMergeLabel(label: string): ContainerRegistryResourcePromise; @@ -7092,7 +7094,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -7103,7 +7105,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + withContainerRegistry(registry: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -7285,7 +7287,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -7296,12 +7298,12 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + withParentRelationship(parent: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -7312,7 +7314,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + withChildRelationship(child: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -7637,7 +7639,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -7648,12 +7650,12 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + testWaitFor(dependency: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -7664,12 +7666,12 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + withDependency(dependency: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -7680,7 +7682,7 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase): ContainerRegistryResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -7866,7 +7868,7 @@ class ContainerRegistryResourcePromiseImpl implements ContainerRegistryResourceP } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + withContainerRegistry(registry: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -7921,12 +7923,12 @@ class ContainerRegistryResourcePromiseImpl implements ContainerRegistryResourceP } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + withParentRelationship(parent: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + withChildRelationship(child: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -8021,17 +8023,17 @@ class ContainerRegistryResourcePromiseImpl implements ContainerRegistryResourceP } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerRegistryResourcePromise { + testWaitFor(dependency: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise { + withDependency(dependency: Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerRegistryResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerRegistryResourcePromise { return new ContainerRegistryResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -8093,7 +8095,7 @@ class ContainerRegistryResourcePromiseImpl implements ContainerRegistryResourceP export interface ContainerResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withContainerRegistry(registry: Awaitable): ContainerResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise; withEntrypoint(entrypoint: string): ContainerResourcePromise; withImageTag(tag: string): ContainerResourcePromise; @@ -8106,8 +8108,8 @@ export interface ContainerResource { publishAsContainer(): ContainerResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise; withContainerName(name: string): ContainerResourcePromise; - withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; + withBuildArg(name: string, value: Awaitable): ContainerResourcePromise; + withBuildSecret(name: string, value: Awaitable): ContainerResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): ContainerResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise; withContainerNetworkAlias(alias: string): ContainerResourcePromise; @@ -8116,18 +8118,18 @@ export interface ContainerResource { withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise; publishAsConnectionString(): ContainerResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ContainerResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ContainerResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ContainerResourcePromise; withArgs(args: string[]): ContainerResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ContainerResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ContainerResourcePromise; withReferenceUri(name: string, uri: string): ContainerResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; + withReferenceExternalService(externalService: Awaitable): ContainerResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): ContainerResourcePromise; withEndpoint(options?: WithEndpointOptions): ContainerResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ContainerResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ContainerResourcePromise; @@ -8140,12 +8142,12 @@ export interface ContainerResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ContainerResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ContainerResourcePromise; excludeFromManifest(): ContainerResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitFor(dependency: Awaitable): ContainerResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitForStart(dependency: Awaitable): ContainerResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise; withExplicitStart(): ContainerResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ContainerResourcePromise; withHealthCheck(key: string): ContainerResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ContainerResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise; @@ -8153,8 +8155,8 @@ export interface ContainerResource { withCertificateTrustScope(scope: CertificateTrustScope): ContainerResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ContainerResourcePromise; withoutHttpsCertificate(): ContainerResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withParentRelationship(parent: Awaitable): ContainerResourcePromise; + withChildRelationship(child: Awaitable): ContainerResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ContainerResourcePromise; excludeFromMcp(): ContainerResourcePromise; @@ -8179,9 +8181,9 @@ export interface ContainerResource { withStatus(status: TestResourceStatus): ContainerResourcePromise; withNestedConfig(config: TestNestedDto): ContainerResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ContainerResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; + testWaitFor(dependency: Awaitable): ContainerResourcePromise; + withDependency(dependency: Awaitable): ContainerResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerResourcePromise; withEndpoints(endpoints: string[]): ContainerResourcePromise; withEnvironmentVariables(variables: Record): ContainerResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerResourcePromise; @@ -8196,7 +8198,7 @@ export interface ContainerResource { } export interface ContainerResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withContainerRegistry(registry: Awaitable): ContainerResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): ContainerResourcePromise; withEntrypoint(entrypoint: string): ContainerResourcePromise; withImageTag(tag: string): ContainerResourcePromise; @@ -8209,8 +8211,8 @@ export interface ContainerResourcePromise extends PromiseLike publishAsContainer(): ContainerResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): ContainerResourcePromise; withContainerName(name: string): ContainerResourcePromise; - withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise; + withBuildArg(name: string, value: Awaitable): ContainerResourcePromise; + withBuildSecret(name: string, value: Awaitable): ContainerResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): ContainerResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ContainerResourcePromise; withContainerNetworkAlias(alias: string): ContainerResourcePromise; @@ -8219,18 +8221,18 @@ export interface ContainerResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise; publishAsConnectionString(): ContainerResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ContainerResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ContainerResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ContainerResourcePromise; withArgs(args: string[]): ContainerResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ContainerResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ContainerResourcePromise; withReferenceUri(name: string, uri: string): ContainerResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise; + withReferenceExternalService(externalService: Awaitable): ContainerResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): ContainerResourcePromise; withEndpoint(options?: WithEndpointOptions): ContainerResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ContainerResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ContainerResourcePromise; @@ -8243,12 +8245,12 @@ export interface ContainerResourcePromise extends PromiseLike withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ContainerResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ContainerResourcePromise; excludeFromManifest(): ContainerResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitFor(dependency: Awaitable): ContainerResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise; + waitForStart(dependency: Awaitable): ContainerResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise; withExplicitStart(): ContainerResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ContainerResourcePromise; withHealthCheck(key: string): ContainerResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ContainerResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ContainerResourcePromise; @@ -8256,8 +8258,8 @@ export interface ContainerResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): ContainerResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ContainerResourcePromise; withoutHttpsCertificate(): ContainerResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; + withParentRelationship(parent: Awaitable): ContainerResourcePromise; + withChildRelationship(child: Awaitable): ContainerResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ContainerResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ContainerResourcePromise; excludeFromMcp(): ContainerResourcePromise; @@ -8282,9 +8284,9 @@ export interface ContainerResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): ContainerResourcePromise; withNestedConfig(config: TestNestedDto): ContainerResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ContainerResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise; + testWaitFor(dependency: Awaitable): ContainerResourcePromise; + withDependency(dependency: Awaitable): ContainerResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerResourcePromise; withEndpoints(endpoints: string[]): ContainerResourcePromise; withEnvironmentVariables(variables: Record): ContainerResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ContainerResourcePromise; @@ -8308,7 +8310,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -8319,7 +8321,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + withContainerRegistry(registry: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -8512,7 +8514,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { + private async _withBuildArgInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -8523,12 +8525,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + withBuildArg(name: string, value: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + private async _withBuildSecretInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -8539,7 +8541,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + withBuildSecret(name: string, value: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } @@ -8674,7 +8676,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -8685,7 +8687,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -8729,7 +8731,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -8743,12 +8745,12 @@ class ContainerResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -8762,12 +8764,12 @@ class ContainerResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -8781,7 +8783,7 @@ class ContainerResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -8821,7 +8823,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -8835,7 +8837,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ContainerResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -8858,7 +8860,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -8869,12 +8871,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise { + withReferenceExternalService(externalService: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -8885,7 +8887,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -9119,7 +9121,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -9130,12 +9132,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + waitFor(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -9146,12 +9148,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -9162,12 +9164,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + waitForStart(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -9178,7 +9180,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -9198,7 +9200,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -9210,7 +9212,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ContainerResourcePromise { const exitCode = options?.exitCode; return new ContainerResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -9304,7 +9306,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -9337,7 +9339,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -9348,12 +9350,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + withParentRelationship(parent: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -9364,7 +9366,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + withChildRelationship(child: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -9807,7 +9809,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -9818,12 +9820,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + testWaitFor(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -9834,12 +9836,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + withDependency(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -9850,7 +9852,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -10051,7 +10053,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + withContainerRegistry(registry: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -10116,12 +10118,12 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + withBuildArg(name: string, value: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource | PromiseLike): ContainerResourcePromise { + withBuildSecret(name: string, value: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } @@ -10166,7 +10168,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ContainerResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -10187,7 +10189,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -10195,7 +10197,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ContainerResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -10203,7 +10205,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -10218,7 +10220,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ContainerResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -10228,12 +10230,12 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ContainerResourcePromise { + withReferenceExternalService(externalService: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ContainerResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -10298,22 +10300,22 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + waitFor(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + waitForStart(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ContainerResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -10323,7 +10325,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ContainerResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -10363,12 +10365,12 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + withParentRelationship(parent: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + withChildRelationship(child: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -10493,17 +10495,17 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ContainerResourcePromise { + testWaitFor(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + withDependency(dependency: Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ContainerResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -10570,7 +10572,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { export interface CSharpAppResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withContainerRegistry(registry: Awaitable): CSharpAppResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise; withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise; withOtlpExporter(): CSharpAppResourcePromise; @@ -10579,18 +10581,18 @@ export interface CSharpAppResource { disableForwardedHeaders(): CSharpAppResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): CSharpAppResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): CSharpAppResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): CSharpAppResourcePromise; withArgs(args: string[]): CSharpAppResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): CSharpAppResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): CSharpAppResourcePromise; withReferenceUri(name: string, uri: string): CSharpAppResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; + withReferenceExternalService(externalService: Awaitable): CSharpAppResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): CSharpAppResourcePromise; withEndpoint(options?: WithEndpointOptions): CSharpAppResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): CSharpAppResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): CSharpAppResourcePromise; @@ -10602,14 +10604,14 @@ export interface CSharpAppResource { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): CSharpAppResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): CSharpAppResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise; + publishWithContainerFiles(source: Awaitable, destinationPath: string): CSharpAppResourcePromise; excludeFromManifest(): CSharpAppResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitFor(dependency: Awaitable): CSharpAppResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitForStart(dependency: Awaitable): CSharpAppResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise; withExplicitStart(): CSharpAppResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): CSharpAppResourcePromise; withHealthCheck(key: string): CSharpAppResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): CSharpAppResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise; @@ -10617,8 +10619,8 @@ export interface CSharpAppResource { withCertificateTrustScope(scope: CertificateTrustScope): CSharpAppResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): CSharpAppResourcePromise; withoutHttpsCertificate(): CSharpAppResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withParentRelationship(parent: Awaitable): CSharpAppResourcePromise; + withChildRelationship(child: Awaitable): CSharpAppResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): CSharpAppResourcePromise; excludeFromMcp(): CSharpAppResourcePromise; @@ -10642,9 +10644,9 @@ export interface CSharpAppResource { withStatus(status: TestResourceStatus): CSharpAppResourcePromise; withNestedConfig(config: TestNestedDto): CSharpAppResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): CSharpAppResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; + testWaitFor(dependency: Awaitable): CSharpAppResourcePromise; + withDependency(dependency: Awaitable): CSharpAppResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): CSharpAppResourcePromise; withEndpoints(endpoints: string[]): CSharpAppResourcePromise; withEnvironmentVariables(variables: Record): CSharpAppResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): CSharpAppResourcePromise; @@ -10659,7 +10661,7 @@ export interface CSharpAppResource { } export interface CSharpAppResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withContainerRegistry(registry: Awaitable): CSharpAppResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): CSharpAppResourcePromise; withMcpServer(options?: WithMcpServerOptions): CSharpAppResourcePromise; withOtlpExporter(): CSharpAppResourcePromise; @@ -10668,18 +10670,18 @@ export interface CSharpAppResourcePromise extends PromiseLike disableForwardedHeaders(): CSharpAppResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): CSharpAppResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): CSharpAppResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): CSharpAppResourcePromise; withArgs(args: string[]): CSharpAppResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): CSharpAppResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): CSharpAppResourcePromise; withReferenceUri(name: string, uri: string): CSharpAppResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise; + withReferenceExternalService(externalService: Awaitable): CSharpAppResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): CSharpAppResourcePromise; withEndpoint(options?: WithEndpointOptions): CSharpAppResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): CSharpAppResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): CSharpAppResourcePromise; @@ -10691,14 +10693,14 @@ export interface CSharpAppResourcePromise extends PromiseLike withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): CSharpAppResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): CSharpAppResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): CSharpAppResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise; + publishWithContainerFiles(source: Awaitable, destinationPath: string): CSharpAppResourcePromise; excludeFromManifest(): CSharpAppResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitFor(dependency: Awaitable): CSharpAppResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise; + waitForStart(dependency: Awaitable): CSharpAppResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise; withExplicitStart(): CSharpAppResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): CSharpAppResourcePromise; withHealthCheck(key: string): CSharpAppResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): CSharpAppResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): CSharpAppResourcePromise; @@ -10706,8 +10708,8 @@ export interface CSharpAppResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): CSharpAppResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): CSharpAppResourcePromise; withoutHttpsCertificate(): CSharpAppResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; + withParentRelationship(parent: Awaitable): CSharpAppResourcePromise; + withChildRelationship(child: Awaitable): CSharpAppResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): CSharpAppResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): CSharpAppResourcePromise; excludeFromMcp(): CSharpAppResourcePromise; @@ -10731,9 +10733,9 @@ export interface CSharpAppResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): CSharpAppResourcePromise; withNestedConfig(config: TestNestedDto): CSharpAppResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): CSharpAppResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise; + testWaitFor(dependency: Awaitable): CSharpAppResourcePromise; + withDependency(dependency: Awaitable): CSharpAppResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): CSharpAppResourcePromise; withEndpoints(endpoints: string[]): CSharpAppResourcePromise; withEnvironmentVariables(variables: Record): CSharpAppResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): CSharpAppResourcePromise; @@ -10757,7 +10759,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -10768,7 +10770,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + withContainerRegistry(registry: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -10910,7 +10912,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -10921,7 +10923,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -10965,7 +10967,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -10979,12 +10981,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -10998,12 +11000,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -11017,7 +11019,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -11057,7 +11059,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -11071,7 +11073,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): CSharpAppResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -11094,7 +11096,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -11105,12 +11107,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise { + withReferenceExternalService(externalService: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -11121,7 +11123,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -11340,7 +11342,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): Promise { + private async _publishWithContainerFilesInternal(source: Awaitable, destinationPath: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source, destinationPath }; const result = await this._client.invokeCapability( @@ -11351,7 +11353,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise { + publishWithContainerFiles(source: Awaitable, destinationPath: string): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath), this._client); } @@ -11371,7 +11373,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -11382,12 +11384,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + waitFor(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -11398,12 +11400,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -11414,12 +11416,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + waitForStart(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -11430,7 +11432,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -11450,7 +11452,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -11462,7 +11464,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): CSharpAppResourcePromise { const exitCode = options?.exitCode; return new CSharpAppResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -11556,7 +11558,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -11589,7 +11591,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -11600,12 +11602,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + withParentRelationship(parent: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -11616,7 +11618,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + withChildRelationship(child: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -12040,7 +12042,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -12051,12 +12053,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + testWaitFor(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -12067,12 +12069,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + withDependency(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -12083,7 +12085,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -12284,7 +12286,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + withContainerRegistry(registry: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -12329,7 +12331,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): CSharpAppResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -12350,7 +12352,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -12358,7 +12360,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): CSharpAppResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -12366,7 +12368,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -12381,7 +12383,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): CSharpAppResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -12391,12 +12393,12 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): CSharpAppResourcePromise { + withReferenceExternalService(externalService: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): CSharpAppResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -12456,7 +12458,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): CSharpAppResourcePromise { + publishWithContainerFiles(source: Awaitable, destinationPath: string): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath)), this._client); } @@ -12466,22 +12468,22 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + waitFor(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + waitForStart(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): CSharpAppResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -12491,7 +12493,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): CSharpAppResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -12531,12 +12533,12 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + withParentRelationship(parent: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + withChildRelationship(child: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -12656,17 +12658,17 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): CSharpAppResourcePromise { + testWaitFor(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + withDependency(dependency: Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): CSharpAppResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -12733,7 +12735,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { export interface DotnetToolResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + withContainerRegistry(registry: Awaitable): DotnetToolResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): DotnetToolResourcePromise; withToolPackage(packageId: string): DotnetToolResourcePromise; withToolVersion(version: string): DotnetToolResourcePromise; @@ -12749,18 +12751,18 @@ export interface DotnetToolResource { withOtlpExporter(): DotnetToolResourcePromise; withOtlpExporterProtocol(protocol: OtlpProtocol): DotnetToolResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): DotnetToolResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): DotnetToolResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): DotnetToolResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): DotnetToolResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): DotnetToolResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): DotnetToolResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): DotnetToolResourcePromise; withArgs(args: string[]): DotnetToolResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): DotnetToolResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): DotnetToolResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): DotnetToolResourcePromise; withReferenceUri(name: string, uri: string): DotnetToolResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): DotnetToolResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; + withReferenceExternalService(externalService: Awaitable): DotnetToolResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): DotnetToolResourcePromise; withEndpoint(options?: WithEndpointOptions): DotnetToolResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): DotnetToolResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): DotnetToolResourcePromise; @@ -12773,12 +12775,12 @@ export interface DotnetToolResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): DotnetToolResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): DotnetToolResourcePromise; excludeFromManifest(): DotnetToolResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitFor(dependency: Awaitable): DotnetToolResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitForStart(dependency: Awaitable): DotnetToolResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise; withExplicitStart(): DotnetToolResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): DotnetToolResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): DotnetToolResourcePromise; withHealthCheck(key: string): DotnetToolResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): DotnetToolResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): DotnetToolResourcePromise; @@ -12786,8 +12788,8 @@ export interface DotnetToolResource { withCertificateTrustScope(scope: CertificateTrustScope): DotnetToolResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): DotnetToolResourcePromise; withoutHttpsCertificate(): DotnetToolResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + withParentRelationship(parent: Awaitable): DotnetToolResourcePromise; + withChildRelationship(child: Awaitable): DotnetToolResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): DotnetToolResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): DotnetToolResourcePromise; excludeFromMcp(): DotnetToolResourcePromise; @@ -12811,9 +12813,9 @@ export interface DotnetToolResource { withStatus(status: TestResourceStatus): DotnetToolResourcePromise; withNestedConfig(config: TestNestedDto): DotnetToolResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): DotnetToolResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; + testWaitFor(dependency: Awaitable): DotnetToolResourcePromise; + withDependency(dependency: Awaitable): DotnetToolResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): DotnetToolResourcePromise; withEndpoints(endpoints: string[]): DotnetToolResourcePromise; withEnvironmentVariables(variables: Record): DotnetToolResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): DotnetToolResourcePromise; @@ -12828,7 +12830,7 @@ export interface DotnetToolResource { } export interface DotnetToolResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + withContainerRegistry(registry: Awaitable): DotnetToolResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): DotnetToolResourcePromise; withToolPackage(packageId: string): DotnetToolResourcePromise; withToolVersion(version: string): DotnetToolResourcePromise; @@ -12844,18 +12846,18 @@ export interface DotnetToolResourcePromise extends PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): DotnetToolResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): DotnetToolResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): DotnetToolResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): DotnetToolResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): DotnetToolResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): DotnetToolResourcePromise; withArgs(args: string[]): DotnetToolResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): DotnetToolResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): DotnetToolResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): DotnetToolResourcePromise; withReferenceUri(name: string, uri: string): DotnetToolResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): DotnetToolResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise; + withReferenceExternalService(externalService: Awaitable): DotnetToolResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): DotnetToolResourcePromise; withEndpoint(options?: WithEndpointOptions): DotnetToolResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): DotnetToolResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): DotnetToolResourcePromise; @@ -12868,12 +12870,12 @@ export interface DotnetToolResourcePromise extends PromiseLike Promise): DotnetToolResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): DotnetToolResourcePromise; excludeFromManifest(): DotnetToolResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitFor(dependency: Awaitable): DotnetToolResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise; + waitForStart(dependency: Awaitable): DotnetToolResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise; withExplicitStart(): DotnetToolResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): DotnetToolResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): DotnetToolResourcePromise; withHealthCheck(key: string): DotnetToolResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): DotnetToolResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): DotnetToolResourcePromise; @@ -12881,8 +12883,8 @@ export interface DotnetToolResourcePromise extends PromiseLike): DotnetToolResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; + withParentRelationship(parent: Awaitable): DotnetToolResourcePromise; + withChildRelationship(child: Awaitable): DotnetToolResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): DotnetToolResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): DotnetToolResourcePromise; excludeFromMcp(): DotnetToolResourcePromise; @@ -12906,9 +12908,9 @@ export interface DotnetToolResourcePromise extends PromiseLike Promise): DotnetToolResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise; + testWaitFor(dependency: Awaitable): DotnetToolResourcePromise; + withDependency(dependency: Awaitable): DotnetToolResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): DotnetToolResourcePromise; withEndpoints(endpoints: string[]): DotnetToolResourcePromise; withEnvironmentVariables(variables: Record): DotnetToolResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): DotnetToolResourcePromise; @@ -12932,7 +12934,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -12943,7 +12945,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withContainerRegistry(registry: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -13188,7 +13190,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -13199,7 +13201,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -13243,7 +13245,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -13257,12 +13259,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -13276,12 +13278,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -13295,7 +13297,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -13335,7 +13337,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -13349,7 +13351,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): DotnetToolResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): DotnetToolResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -13372,7 +13374,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -13383,12 +13385,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withReferenceExternalService(externalService: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -13399,7 +13401,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -13633,7 +13635,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -13644,12 +13646,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + waitFor(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -13660,12 +13662,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -13676,12 +13678,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + waitForStart(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -13692,7 +13694,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -13712,7 +13714,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -13724,7 +13726,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): DotnetToolResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): DotnetToolResourcePromise { const exitCode = options?.exitCode; return new DotnetToolResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -13818,7 +13820,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -13851,7 +13853,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -13862,12 +13864,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withParentRelationship(parent: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -13878,7 +13880,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withChildRelationship(child: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -14302,7 +14304,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -14313,12 +14315,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + testWaitFor(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -14329,12 +14331,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withDependency(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -14345,7 +14347,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -14546,7 +14548,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + withContainerRegistry(registry: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -14626,7 +14628,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): DotnetToolResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -14647,7 +14649,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -14655,7 +14657,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): DotnetToolResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -14663,7 +14665,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -14678,7 +14680,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): DotnetToolResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -14688,12 +14690,12 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): DotnetToolResourcePromise { + withReferenceExternalService(externalService: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): DotnetToolResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -14758,22 +14760,22 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + waitFor(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + waitForStart(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): DotnetToolResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -14783,7 +14785,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): DotnetToolResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -14823,12 +14825,12 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + withParentRelationship(parent: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + withChildRelationship(child: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -14948,17 +14950,17 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): DotnetToolResourcePromise { + testWaitFor(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise { + withDependency(dependency: Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): DotnetToolResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -15025,7 +15027,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { export interface ExecutableResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + withContainerRegistry(registry: Awaitable): ExecutableResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExecutableResourcePromise; publishAsDockerFile(): ExecutableResourcePromise; publishAsDockerFileWithConfigure(configure: (obj: ContainerResource) => Promise): ExecutableResourcePromise; @@ -15035,18 +15037,18 @@ export interface ExecutableResource { withOtlpExporter(): ExecutableResourcePromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ExecutableResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExecutableResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ExecutableResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ExecutableResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ExecutableResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ExecutableResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ExecutableResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ExecutableResourcePromise; withArgs(args: string[]): ExecutableResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ExecutableResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ExecutableResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ExecutableResourcePromise; withReferenceUri(name: string, uri: string): ExecutableResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ExecutableResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; + withReferenceExternalService(externalService: Awaitable): ExecutableResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): ExecutableResourcePromise; withEndpoint(options?: WithEndpointOptions): ExecutableResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ExecutableResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ExecutableResourcePromise; @@ -15059,12 +15061,12 @@ export interface ExecutableResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ExecutableResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ExecutableResourcePromise; excludeFromManifest(): ExecutableResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitFor(dependency: Awaitable): ExecutableResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitForStart(dependency: Awaitable): ExecutableResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise; withExplicitStart(): ExecutableResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ExecutableResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ExecutableResourcePromise; withHealthCheck(key: string): ExecutableResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ExecutableResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExecutableResourcePromise; @@ -15072,8 +15074,8 @@ export interface ExecutableResource { withCertificateTrustScope(scope: CertificateTrustScope): ExecutableResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ExecutableResourcePromise; withoutHttpsCertificate(): ExecutableResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + withParentRelationship(parent: Awaitable): ExecutableResourcePromise; + withChildRelationship(child: Awaitable): ExecutableResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExecutableResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ExecutableResourcePromise; excludeFromMcp(): ExecutableResourcePromise; @@ -15097,9 +15099,9 @@ export interface ExecutableResource { withStatus(status: TestResourceStatus): ExecutableResourcePromise; withNestedConfig(config: TestNestedDto): ExecutableResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ExecutableResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; + testWaitFor(dependency: Awaitable): ExecutableResourcePromise; + withDependency(dependency: Awaitable): ExecutableResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExecutableResourcePromise; withEndpoints(endpoints: string[]): ExecutableResourcePromise; withEnvironmentVariables(variables: Record): ExecutableResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExecutableResourcePromise; @@ -15114,7 +15116,7 @@ export interface ExecutableResource { } export interface ExecutableResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + withContainerRegistry(registry: Awaitable): ExecutableResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExecutableResourcePromise; publishAsDockerFile(): ExecutableResourcePromise; publishAsDockerFileWithConfigure(configure: (obj: ContainerResource) => Promise): ExecutableResourcePromise; @@ -15124,18 +15126,18 @@ export interface ExecutableResourcePromise extends PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ExecutableResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ExecutableResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ExecutableResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ExecutableResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ExecutableResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ExecutableResourcePromise; withArgs(args: string[]): ExecutableResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ExecutableResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ExecutableResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ExecutableResourcePromise; withReferenceUri(name: string, uri: string): ExecutableResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ExecutableResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise; + withReferenceExternalService(externalService: Awaitable): ExecutableResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): ExecutableResourcePromise; withEndpoint(options?: WithEndpointOptions): ExecutableResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ExecutableResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ExecutableResourcePromise; @@ -15148,12 +15150,12 @@ export interface ExecutableResourcePromise extends PromiseLike Promise): ExecutableResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ExecutableResourcePromise; excludeFromManifest(): ExecutableResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitFor(dependency: Awaitable): ExecutableResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise; + waitForStart(dependency: Awaitable): ExecutableResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise; withExplicitStart(): ExecutableResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ExecutableResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ExecutableResourcePromise; withHealthCheck(key: string): ExecutableResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ExecutableResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExecutableResourcePromise; @@ -15161,8 +15163,8 @@ export interface ExecutableResourcePromise extends PromiseLike): ExecutableResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; + withParentRelationship(parent: Awaitable): ExecutableResourcePromise; + withChildRelationship(child: Awaitable): ExecutableResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExecutableResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ExecutableResourcePromise; excludeFromMcp(): ExecutableResourcePromise; @@ -15186,9 +15188,9 @@ export interface ExecutableResourcePromise extends PromiseLike Promise): ExecutableResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise; + testWaitFor(dependency: Awaitable): ExecutableResourcePromise; + withDependency(dependency: Awaitable): ExecutableResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExecutableResourcePromise; withEndpoints(endpoints: string[]): ExecutableResourcePromise; withEnvironmentVariables(variables: Record): ExecutableResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExecutableResourcePromise; @@ -15212,7 +15214,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -15223,7 +15225,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withContainerRegistry(registry: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -15378,7 +15380,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -15389,7 +15391,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -15433,7 +15435,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -15447,12 +15449,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -15466,12 +15468,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -15485,7 +15487,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -15525,7 +15527,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -15539,7 +15541,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ExecutableResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ExecutableResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -15562,7 +15564,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -15573,12 +15575,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withReferenceExternalService(externalService: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -15589,7 +15591,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -15823,7 +15825,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -15834,12 +15836,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + waitFor(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -15850,12 +15852,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ExecutableResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -15866,12 +15868,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + waitForStart(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -15882,7 +15884,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ExecutableResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -15902,7 +15904,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -15914,7 +15916,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ExecutableResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ExecutableResourcePromise { const exitCode = options?.exitCode; return new ExecutableResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -16008,7 +16010,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -16041,7 +16043,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -16052,12 +16054,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withParentRelationship(parent: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -16068,7 +16070,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withChildRelationship(child: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -16492,7 +16494,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -16503,12 +16505,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + testWaitFor(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -16519,12 +16521,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withDependency(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -16535,7 +16537,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -16736,7 +16738,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + withContainerRegistry(registry: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -16786,7 +16788,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ExecutableResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -16807,7 +16809,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -16815,7 +16817,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ExecutableResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -16823,7 +16825,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -16838,7 +16840,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ExecutableResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -16848,12 +16850,12 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ExecutableResourcePromise { + withReferenceExternalService(externalService: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ExecutableResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -16918,22 +16920,22 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + waitFor(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + waitForStart(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ExecutableResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -16943,7 +16945,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ExecutableResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -16983,12 +16985,12 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + withParentRelationship(parent: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + withChildRelationship(child: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -17108,17 +17110,17 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExecutableResourcePromise { + testWaitFor(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise { + withDependency(dependency: Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExecutableResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -17185,7 +17187,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { export interface ExternalServiceResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withContainerRegistry(registry: Awaitable): ExternalServiceResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExternalServiceResourcePromise; withExternalServiceHttpHealthCheck(options?: WithExternalServiceHttpHealthCheckOptions): ExternalServiceResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExternalServiceResourcePromise; @@ -17197,8 +17199,8 @@ export interface ExternalServiceResource { withExplicitStart(): ExternalServiceResourcePromise; withHealthCheck(key: string): ExternalServiceResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ExternalServiceResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withParentRelationship(parent: Awaitable): ExternalServiceResourcePromise; + withChildRelationship(child: Awaitable): ExternalServiceResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExternalServiceResourcePromise; excludeFromMcp(): ExternalServiceResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ExternalServiceResourcePromise; @@ -17217,9 +17219,9 @@ export interface ExternalServiceResource { withStatus(status: TestResourceStatus): ExternalServiceResourcePromise; withNestedConfig(config: TestNestedDto): ExternalServiceResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ExternalServiceResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; + testWaitFor(dependency: Awaitable): ExternalServiceResourcePromise; + withDependency(dependency: Awaitable): ExternalServiceResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExternalServiceResourcePromise; withEndpoints(endpoints: string[]): ExternalServiceResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExternalServiceResourcePromise; withMergeLabel(label: string): ExternalServiceResourcePromise; @@ -17233,7 +17235,7 @@ export interface ExternalServiceResource { } export interface ExternalServiceResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withContainerRegistry(registry: Awaitable): ExternalServiceResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ExternalServiceResourcePromise; withExternalServiceHttpHealthCheck(options?: WithExternalServiceHttpHealthCheckOptions): ExternalServiceResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExternalServiceResourcePromise; @@ -17245,8 +17247,8 @@ export interface ExternalServiceResourcePromise extends PromiseLike Promise, options?: WithCommandOptions): ExternalServiceResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; + withParentRelationship(parent: Awaitable): ExternalServiceResourcePromise; + withChildRelationship(child: Awaitable): ExternalServiceResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ExternalServiceResourcePromise; excludeFromMcp(): ExternalServiceResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ExternalServiceResourcePromise; @@ -17265,9 +17267,9 @@ export interface ExternalServiceResourcePromise extends PromiseLike Promise): ExternalServiceResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise; + testWaitFor(dependency: Awaitable): ExternalServiceResourcePromise; + withDependency(dependency: Awaitable): ExternalServiceResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExternalServiceResourcePromise; withEndpoints(endpoints: string[]): ExternalServiceResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ExternalServiceResourcePromise; withMergeLabel(label: string): ExternalServiceResourcePromise; @@ -17290,7 +17292,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -17301,7 +17303,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + withContainerRegistry(registry: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -17502,7 +17504,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -17513,12 +17515,12 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + withParentRelationship(parent: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -17529,7 +17531,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + withChildRelationship(child: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -17854,7 +17856,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -17865,12 +17867,12 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + testWaitFor(dependency: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -17881,12 +17883,12 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + withDependency(dependency: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -17897,7 +17899,7 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase): ExternalServiceResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -18083,7 +18085,7 @@ class ExternalServiceResourcePromiseImpl implements ExternalServiceResourcePromi } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + withContainerRegistry(registry: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -18143,12 +18145,12 @@ class ExternalServiceResourcePromiseImpl implements ExternalServiceResourcePromi } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + withParentRelationship(parent: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + withChildRelationship(child: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -18243,17 +18245,17 @@ class ExternalServiceResourcePromiseImpl implements ExternalServiceResourcePromi } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ExternalServiceResourcePromise { + testWaitFor(dependency: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise { + withDependency(dependency: Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ExternalServiceResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ExternalServiceResourcePromise { return new ExternalServiceResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -18315,7 +18317,7 @@ class ExternalServiceResourcePromiseImpl implements ExternalServiceResourcePromi export interface ParameterResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withContainerRegistry(registry: Awaitable): ParameterResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise; withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise; @@ -18327,8 +18329,8 @@ export interface ParameterResource { withExplicitStart(): ParameterResourcePromise; withHealthCheck(key: string): ParameterResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withParentRelationship(parent: Awaitable): ParameterResourcePromise; + withChildRelationship(child: Awaitable): ParameterResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise; excludeFromMcp(): ParameterResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ParameterResourcePromise; @@ -18347,9 +18349,9 @@ export interface ParameterResource { withStatus(status: TestResourceStatus): ParameterResourcePromise; withNestedConfig(config: TestNestedDto): ParameterResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ParameterResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; + testWaitFor(dependency: Awaitable): ParameterResourcePromise; + withDependency(dependency: Awaitable): ParameterResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ParameterResourcePromise; withEndpoints(endpoints: string[]): ParameterResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ParameterResourcePromise; withMergeLabel(label: string): ParameterResourcePromise; @@ -18363,7 +18365,7 @@ export interface ParameterResource { } export interface ParameterResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withContainerRegistry(registry: Awaitable): ParameterResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ParameterResourcePromise; withDescription(description: string, options?: WithDescriptionOptions): ParameterResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ParameterResourcePromise; @@ -18375,8 +18377,8 @@ export interface ParameterResourcePromise extends PromiseLike withExplicitStart(): ParameterResourcePromise; withHealthCheck(key: string): ParameterResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ParameterResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; + withParentRelationship(parent: Awaitable): ParameterResourcePromise; + withChildRelationship(child: Awaitable): ParameterResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ParameterResourcePromise; excludeFromMcp(): ParameterResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ParameterResourcePromise; @@ -18395,9 +18397,9 @@ export interface ParameterResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): ParameterResourcePromise; withNestedConfig(config: TestNestedDto): ParameterResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ParameterResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise; + testWaitFor(dependency: Awaitable): ParameterResourcePromise; + withDependency(dependency: Awaitable): ParameterResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ParameterResourcePromise; withEndpoints(endpoints: string[]): ParameterResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ParameterResourcePromise; withMergeLabel(label: string): ParameterResourcePromise; @@ -18420,7 +18422,7 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -18431,7 +18433,7 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + withContainerRegistry(registry: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -18630,7 +18632,7 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -18641,12 +18643,12 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + withParentRelationship(parent: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -18657,7 +18659,7 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + withChildRelationship(child: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -18982,7 +18984,7 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -18993,12 +18995,12 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + testWaitFor(dependency: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -19009,12 +19011,12 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + withDependency(dependency: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -19025,7 +19027,7 @@ class ParameterResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -19211,7 +19213,7 @@ class ParameterResourcePromiseImpl implements ParameterResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + withContainerRegistry(registry: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -19271,12 +19273,12 @@ class ParameterResourcePromiseImpl implements ParameterResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + withParentRelationship(parent: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + withChildRelationship(child: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -19371,17 +19373,17 @@ class ParameterResourcePromiseImpl implements ParameterResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ParameterResourcePromise { + testWaitFor(dependency: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + withDependency(dependency: Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ParameterResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ParameterResourcePromise { return new ParameterResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -19443,7 +19445,7 @@ class ParameterResourcePromiseImpl implements ParameterResourcePromise { export interface ProjectResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withContainerRegistry(registry: Awaitable): ProjectResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise; withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise; withOtlpExporter(): ProjectResourcePromise; @@ -19452,18 +19454,18 @@ export interface ProjectResource { disableForwardedHeaders(): ProjectResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ProjectResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ProjectResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ProjectResourcePromise; withArgs(args: string[]): ProjectResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ProjectResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ProjectResourcePromise; withReferenceUri(name: string, uri: string): ProjectResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; + withReferenceExternalService(externalService: Awaitable): ProjectResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): ProjectResourcePromise; withEndpoint(options?: WithEndpointOptions): ProjectResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ProjectResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ProjectResourcePromise; @@ -19475,14 +19477,14 @@ export interface ProjectResource { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ProjectResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ProjectResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise; + publishWithContainerFiles(source: Awaitable, destinationPath: string): ProjectResourcePromise; excludeFromManifest(): ProjectResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitFor(dependency: Awaitable): ProjectResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitForStart(dependency: Awaitable): ProjectResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise; withExplicitStart(): ProjectResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ProjectResourcePromise; withHealthCheck(key: string): ProjectResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ProjectResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise; @@ -19490,8 +19492,8 @@ export interface ProjectResource { withCertificateTrustScope(scope: CertificateTrustScope): ProjectResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ProjectResourcePromise; withoutHttpsCertificate(): ProjectResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withParentRelationship(parent: Awaitable): ProjectResourcePromise; + withChildRelationship(child: Awaitable): ProjectResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ProjectResourcePromise; excludeFromMcp(): ProjectResourcePromise; @@ -19515,9 +19517,9 @@ export interface ProjectResource { withStatus(status: TestResourceStatus): ProjectResourcePromise; withNestedConfig(config: TestNestedDto): ProjectResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ProjectResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; + testWaitFor(dependency: Awaitable): ProjectResourcePromise; + withDependency(dependency: Awaitable): ProjectResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ProjectResourcePromise; withEndpoints(endpoints: string[]): ProjectResourcePromise; withEnvironmentVariables(variables: Record): ProjectResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ProjectResourcePromise; @@ -19532,7 +19534,7 @@ export interface ProjectResource { } export interface ProjectResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withContainerRegistry(registry: Awaitable): ProjectResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ProjectResourcePromise; withMcpServer(options?: WithMcpServerOptions): ProjectResourcePromise; withOtlpExporter(): ProjectResourcePromise; @@ -19541,18 +19543,18 @@ export interface ProjectResourcePromise extends PromiseLike { disableForwardedHeaders(): ProjectResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ProjectResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ProjectResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ProjectResourcePromise; withArgs(args: string[]): ProjectResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): ProjectResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ProjectResourcePromise; withReferenceUri(name: string, uri: string): ProjectResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise; + withReferenceExternalService(externalService: Awaitable): ProjectResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): ProjectResourcePromise; withEndpoint(options?: WithEndpointOptions): ProjectResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): ProjectResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): ProjectResourcePromise; @@ -19564,14 +19566,14 @@ export interface ProjectResourcePromise extends PromiseLike { withUrlExpression(url: ReferenceExpression, options?: WithUrlExpressionOptions): ProjectResourcePromise; withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): ProjectResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): ProjectResourcePromise; - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise; + publishWithContainerFiles(source: Awaitable, destinationPath: string): ProjectResourcePromise; excludeFromManifest(): ProjectResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitFor(dependency: Awaitable): ProjectResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise; + waitForStart(dependency: Awaitable): ProjectResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise; withExplicitStart(): ProjectResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ProjectResourcePromise; withHealthCheck(key: string): ProjectResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): ProjectResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ProjectResourcePromise; @@ -19579,8 +19581,8 @@ export interface ProjectResourcePromise extends PromiseLike { withCertificateTrustScope(scope: CertificateTrustScope): ProjectResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ProjectResourcePromise; withoutHttpsCertificate(): ProjectResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; + withParentRelationship(parent: Awaitable): ProjectResourcePromise; + withChildRelationship(child: Awaitable): ProjectResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ProjectResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): ProjectResourcePromise; excludeFromMcp(): ProjectResourcePromise; @@ -19604,9 +19606,9 @@ export interface ProjectResourcePromise extends PromiseLike { withStatus(status: TestResourceStatus): ProjectResourcePromise; withNestedConfig(config: TestNestedDto): ProjectResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ProjectResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise; + testWaitFor(dependency: Awaitable): ProjectResourcePromise; + withDependency(dependency: Awaitable): ProjectResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ProjectResourcePromise; withEndpoints(endpoints: string[]): ProjectResourcePromise; withEnvironmentVariables(variables: Record): ProjectResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ProjectResourcePromise; @@ -19630,7 +19632,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -19641,7 +19643,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + withContainerRegistry(registry: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -19783,7 +19785,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -19794,7 +19796,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -19838,7 +19840,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -19852,12 +19854,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -19871,12 +19873,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -19890,7 +19892,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -19930,7 +19932,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -19944,7 +19946,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ProjectResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -19967,7 +19969,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -19978,12 +19980,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise { + withReferenceExternalService(externalService: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -19994,7 +19996,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -20213,7 +20215,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _publishWithContainerFilesInternal(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): Promise { + private async _publishWithContainerFilesInternal(source: Awaitable, destinationPath: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source, destinationPath }; const result = await this._client.invokeCapability( @@ -20224,7 +20226,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise { + publishWithContainerFiles(source: Awaitable, destinationPath: string): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath), this._client); } @@ -20244,7 +20246,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -20255,12 +20257,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + waitFor(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -20271,12 +20273,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -20287,12 +20289,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + waitForStart(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -20303,7 +20305,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -20323,7 +20325,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -20335,7 +20337,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ProjectResourcePromise { const exitCode = options?.exitCode; return new ProjectResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -20429,7 +20431,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -20462,7 +20464,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -20473,12 +20475,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + withParentRelationship(parent: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -20489,7 +20491,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + withChildRelationship(child: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -20913,7 +20915,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -20924,12 +20926,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + testWaitFor(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -20940,12 +20942,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + withDependency(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -20956,7 +20958,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -21157,7 +21159,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + withContainerRegistry(registry: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -21202,7 +21204,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ProjectResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -21223,7 +21225,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -21231,7 +21233,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ProjectResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -21239,7 +21241,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -21254,7 +21256,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ProjectResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -21264,12 +21266,12 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ProjectResourcePromise { + withReferenceExternalService(externalService: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ProjectResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -21329,7 +21331,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ProjectResourcePromise { + publishWithContainerFiles(source: Awaitable, destinationPath: string): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath)), this._client); } @@ -21339,22 +21341,22 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + waitFor(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + waitForStart(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ProjectResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -21364,7 +21366,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ProjectResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -21404,12 +21406,12 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + withParentRelationship(parent: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + withChildRelationship(child: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -21529,17 +21531,17 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ProjectResourcePromise { + testWaitFor(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + withDependency(dependency: Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ProjectResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -21606,7 +21608,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { export interface TestDatabaseResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withContainerRegistry(registry: Awaitable): TestDatabaseResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestDatabaseResourcePromise; withEntrypoint(entrypoint: string): TestDatabaseResourcePromise; withImageTag(tag: string): TestDatabaseResourcePromise; @@ -21619,8 +21621,8 @@ export interface TestDatabaseResource { publishAsContainer(): TestDatabaseResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestDatabaseResourcePromise; withContainerName(name: string): TestDatabaseResourcePromise; - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise; + withBuildArg(name: string, value: Awaitable): TestDatabaseResourcePromise; + withBuildSecret(name: string, value: Awaitable): TestDatabaseResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestDatabaseResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestDatabaseResourcePromise; withContainerNetworkAlias(alias: string): TestDatabaseResourcePromise; @@ -21629,18 +21631,18 @@ export interface TestDatabaseResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestDatabaseResourcePromise; publishAsConnectionString(): TestDatabaseResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestDatabaseResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestDatabaseResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestDatabaseResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestDatabaseResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestDatabaseResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): TestDatabaseResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestDatabaseResourcePromise; withArgs(args: string[]): TestDatabaseResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestDatabaseResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestDatabaseResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): TestDatabaseResourcePromise; withReferenceUri(name: string, uri: string): TestDatabaseResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestDatabaseResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; + withReferenceExternalService(externalService: Awaitable): TestDatabaseResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): TestDatabaseResourcePromise; withEndpoint(options?: WithEndpointOptions): TestDatabaseResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestDatabaseResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestDatabaseResourcePromise; @@ -21653,12 +21655,12 @@ export interface TestDatabaseResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestDatabaseResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestDatabaseResourcePromise; excludeFromManifest(): TestDatabaseResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitFor(dependency: Awaitable): TestDatabaseResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitForStart(dependency: Awaitable): TestDatabaseResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; withExplicitStart(): TestDatabaseResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; withHealthCheck(key: string): TestDatabaseResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestDatabaseResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestDatabaseResourcePromise; @@ -21666,8 +21668,8 @@ export interface TestDatabaseResource { withCertificateTrustScope(scope: CertificateTrustScope): TestDatabaseResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestDatabaseResourcePromise; withoutHttpsCertificate(): TestDatabaseResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withParentRelationship(parent: Awaitable): TestDatabaseResourcePromise; + withChildRelationship(child: Awaitable): TestDatabaseResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestDatabaseResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestDatabaseResourcePromise; excludeFromMcp(): TestDatabaseResourcePromise; @@ -21692,9 +21694,9 @@ export interface TestDatabaseResource { withStatus(status: TestResourceStatus): TestDatabaseResourcePromise; withNestedConfig(config: TestNestedDto): TestDatabaseResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise; + withDependency(dependency: Awaitable): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -21709,7 +21711,7 @@ export interface TestDatabaseResource { } export interface TestDatabaseResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withContainerRegistry(registry: Awaitable): TestDatabaseResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestDatabaseResourcePromise; withEntrypoint(entrypoint: string): TestDatabaseResourcePromise; withImageTag(tag: string): TestDatabaseResourcePromise; @@ -21722,8 +21724,8 @@ export interface TestDatabaseResourcePromise extends PromiseLike): TestDatabaseResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise; + withBuildArg(name: string, value: Awaitable): TestDatabaseResourcePromise; + withBuildSecret(name: string, value: Awaitable): TestDatabaseResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestDatabaseResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestDatabaseResourcePromise; withContainerNetworkAlias(alias: string): TestDatabaseResourcePromise; @@ -21732,18 +21734,18 @@ export interface TestDatabaseResourcePromise extends PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestDatabaseResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestDatabaseResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestDatabaseResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestDatabaseResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): TestDatabaseResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestDatabaseResourcePromise; withArgs(args: string[]): TestDatabaseResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestDatabaseResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestDatabaseResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): TestDatabaseResourcePromise; withReferenceUri(name: string, uri: string): TestDatabaseResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestDatabaseResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise; + withReferenceExternalService(externalService: Awaitable): TestDatabaseResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): TestDatabaseResourcePromise; withEndpoint(options?: WithEndpointOptions): TestDatabaseResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestDatabaseResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestDatabaseResourcePromise; @@ -21756,12 +21758,12 @@ export interface TestDatabaseResourcePromise extends PromiseLike Promise): TestDatabaseResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestDatabaseResourcePromise; excludeFromManifest(): TestDatabaseResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitFor(dependency: Awaitable): TestDatabaseResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; + waitForStart(dependency: Awaitable): TestDatabaseResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise; withExplicitStart(): TestDatabaseResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestDatabaseResourcePromise; withHealthCheck(key: string): TestDatabaseResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestDatabaseResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestDatabaseResourcePromise; @@ -21769,8 +21771,8 @@ export interface TestDatabaseResourcePromise extends PromiseLike): TestDatabaseResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; + withParentRelationship(parent: Awaitable): TestDatabaseResourcePromise; + withChildRelationship(child: Awaitable): TestDatabaseResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestDatabaseResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestDatabaseResourcePromise; excludeFromMcp(): TestDatabaseResourcePromise; @@ -21795,9 +21797,9 @@ export interface TestDatabaseResourcePromise extends PromiseLike Promise): TestDatabaseResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise; + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise; + withDependency(dependency: Awaitable): TestDatabaseResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise; withEndpoints(endpoints: string[]): TestDatabaseResourcePromise; withEnvironmentVariables(variables: Record): TestDatabaseResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestDatabaseResourcePromise; @@ -21821,7 +21823,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -21832,7 +21834,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withContainerRegistry(registry: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -22025,7 +22027,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _withBuildArgInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -22036,12 +22038,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withBuildArg(name: string, value: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + private async _withBuildSecretInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -22052,7 +22054,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withBuildSecret(name: string, value: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } @@ -22187,7 +22189,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -22198,7 +22200,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -22242,7 +22244,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -22256,12 +22258,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -22275,12 +22277,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -22294,7 +22296,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -22334,7 +22336,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -22348,7 +22350,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WithReferenceOptions): TestDatabaseResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): TestDatabaseResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -22371,7 +22373,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -22382,12 +22384,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withReferenceExternalService(externalService: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -22398,7 +22400,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -22632,7 +22634,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -22643,12 +22645,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + waitFor(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -22659,12 +22661,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -22675,12 +22677,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + waitForStart(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -22691,7 +22693,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -22711,7 +22713,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -22723,7 +22725,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { const exitCode = options?.exitCode; return new TestDatabaseResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -22817,7 +22819,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -22850,7 +22852,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -22861,12 +22863,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withParentRelationship(parent: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -22877,7 +22879,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withChildRelationship(child: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -23320,7 +23322,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -23331,12 +23333,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -23347,12 +23349,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withDependency(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -23363,7 +23365,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -23564,7 +23566,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + withContainerRegistry(registry: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -23629,12 +23631,12 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise { + withBuildArg(name: string, value: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestDatabaseResourcePromise { + withBuildSecret(name: string, value: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } @@ -23679,7 +23681,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestDatabaseResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -23700,7 +23702,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -23708,7 +23710,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestDatabaseResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -23716,7 +23718,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -23731,7 +23733,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestDatabaseResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -23741,12 +23743,12 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestDatabaseResourcePromise { + withReferenceExternalService(externalService: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestDatabaseResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -23811,22 +23813,22 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + waitFor(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + waitForStart(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -23836,7 +23838,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -23876,12 +23878,12 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + withParentRelationship(parent: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + withChildRelationship(child: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -24006,17 +24008,17 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestDatabaseResourcePromise { + testWaitFor(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + withDependency(dependency: Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestDatabaseResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -24083,7 +24085,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { export interface TestRedisResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + withContainerRegistry(registry: Awaitable): TestRedisResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise; withEntrypoint(entrypoint: string): TestRedisResourcePromise; withImageTag(tag: string): TestRedisResourcePromise; @@ -24096,8 +24098,8 @@ export interface TestRedisResource { publishAsContainer(): TestRedisResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise; withContainerName(name: string): TestRedisResourcePromise; - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; + withBuildArg(name: string, value: Awaitable): TestRedisResourcePromise; + withBuildSecret(name: string, value: Awaitable): TestRedisResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestRedisResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise; withContainerNetworkAlias(alias: string): TestRedisResourcePromise; @@ -24106,21 +24108,21 @@ export interface TestRedisResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise; publishAsConnectionString(): TestRedisResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestRedisResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): TestRedisResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestRedisResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): TestRedisResourcePromise; withConnectionPropertyValue(name: string, value: string): TestRedisResourcePromise; withArgs(args: string[]): TestRedisResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestRedisResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): TestRedisResourcePromise; getConnectionProperty(key: string): Promise; withReferenceUri(name: string, uri: string): TestRedisResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; + withReferenceExternalService(externalService: Awaitable): TestRedisResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): TestRedisResourcePromise; withEndpoint(options?: WithEndpointOptions): TestRedisResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestRedisResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestRedisResourcePromise; @@ -24133,12 +24135,12 @@ export interface TestRedisResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestRedisResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestRedisResourcePromise; excludeFromManifest(): TestRedisResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitFor(dependency: Awaitable): TestRedisResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitForStart(dependency: Awaitable): TestRedisResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise; withExplicitStart(): TestRedisResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestRedisResourcePromise; withHealthCheck(key: string): TestRedisResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestRedisResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise; @@ -24146,8 +24148,8 @@ export interface TestRedisResource { withCertificateTrustScope(scope: CertificateTrustScope): TestRedisResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestRedisResourcePromise; withoutHttpsCertificate(): TestRedisResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + withParentRelationship(parent: Awaitable): TestRedisResourcePromise; + withChildRelationship(child: Awaitable): TestRedisResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestRedisResourcePromise; excludeFromMcp(): TestRedisResourcePromise; @@ -24178,12 +24180,12 @@ export interface TestRedisResource { withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + testWaitFor(dependency: Awaitable): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withDependency(dependency: Awaitable): TestRedisResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -24202,7 +24204,7 @@ export interface TestRedisResource { } export interface TestRedisResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + withContainerRegistry(registry: Awaitable): TestRedisResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestRedisResourcePromise; withEntrypoint(entrypoint: string): TestRedisResourcePromise; withImageTag(tag: string): TestRedisResourcePromise; @@ -24215,8 +24217,8 @@ export interface TestRedisResourcePromise extends PromiseLike publishAsContainer(): TestRedisResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestRedisResourcePromise; withContainerName(name: string): TestRedisResourcePromise; - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise; + withBuildArg(name: string, value: Awaitable): TestRedisResourcePromise; + withBuildSecret(name: string, value: Awaitable): TestRedisResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestRedisResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestRedisResourcePromise; withContainerNetworkAlias(alias: string): TestRedisResourcePromise; @@ -24225,21 +24227,21 @@ export interface TestRedisResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise; publishAsConnectionString(): TestRedisResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestRedisResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): TestRedisResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestRedisResourcePromise; withConnectionProperty(name: string, value: ReferenceExpression): TestRedisResourcePromise; withConnectionPropertyValue(name: string, value: string): TestRedisResourcePromise; withArgs(args: string[]): TestRedisResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestRedisResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): TestRedisResourcePromise; getConnectionProperty(key: string): Promise; withReferenceUri(name: string, uri: string): TestRedisResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise; + withReferenceExternalService(externalService: Awaitable): TestRedisResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): TestRedisResourcePromise; withEndpoint(options?: WithEndpointOptions): TestRedisResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestRedisResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestRedisResourcePromise; @@ -24252,12 +24254,12 @@ export interface TestRedisResourcePromise extends PromiseLike withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestRedisResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestRedisResourcePromise; excludeFromManifest(): TestRedisResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitFor(dependency: Awaitable): TestRedisResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise; + waitForStart(dependency: Awaitable): TestRedisResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise; withExplicitStart(): TestRedisResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestRedisResourcePromise; withHealthCheck(key: string): TestRedisResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestRedisResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestRedisResourcePromise; @@ -24265,8 +24267,8 @@ export interface TestRedisResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): TestRedisResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestRedisResourcePromise; withoutHttpsCertificate(): TestRedisResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + withParentRelationship(parent: Awaitable): TestRedisResourcePromise; + withChildRelationship(child: Awaitable): TestRedisResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestRedisResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestRedisResourcePromise; excludeFromMcp(): TestRedisResourcePromise; @@ -24297,12 +24299,12 @@ export interface TestRedisResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestRedisResourcePromise; withNestedConfig(config: TestNestedDto): TestRedisResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestRedisResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise; + testWaitFor(dependency: Awaitable): TestRedisResourcePromise; getEndpoints(): Promise; withConnectionStringDirect(connectionString: string): TestRedisResourcePromise; withRedisSpecific(option: string): TestRedisResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise; + withDependency(dependency: Awaitable): TestRedisResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise; withEndpoints(endpoints: string[]): TestRedisResourcePromise; withEnvironmentVariables(variables: Record): TestRedisResourcePromise; getStatusAsync(options?: GetStatusAsyncOptions): Promise; @@ -24330,7 +24332,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -24341,7 +24343,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + withContainerRegistry(registry: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -24534,7 +24536,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { + private async _withBuildArgInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -24545,12 +24547,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + withBuildArg(name: string, value: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + private async _withBuildSecretInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -24561,7 +24563,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + withBuildSecret(name: string, value: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } @@ -24696,7 +24698,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -24707,7 +24709,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -24751,7 +24753,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -24765,12 +24767,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -24784,12 +24786,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -24803,7 +24805,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -24874,7 +24876,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -24888,7 +24890,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): TestRedisResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -24920,7 +24922,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -24931,12 +24933,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise { + withReferenceExternalService(externalService: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -24947,7 +24949,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -25181,7 +25183,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -25192,12 +25194,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + waitFor(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -25208,12 +25210,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -25224,12 +25226,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + waitForStart(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -25240,7 +25242,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -25260,7 +25262,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -25272,7 +25274,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestRedisResourcePromise { const exitCode = options?.exitCode; return new TestRedisResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -25366,7 +25368,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -25399,7 +25401,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -25410,12 +25412,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + withParentRelationship(parent: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -25426,7 +25428,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + withChildRelationship(child: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -25957,7 +25959,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -25968,7 +25970,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + testWaitFor(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } @@ -26012,7 +26014,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -26023,12 +26025,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withDependency(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -26039,7 +26041,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -26303,7 +26305,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + withContainerRegistry(registry: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -26368,12 +26370,12 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + withBuildArg(name: string, value: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestRedisResourcePromise { + withBuildSecret(name: string, value: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } @@ -26418,7 +26420,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestRedisResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -26439,7 +26441,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -26447,7 +26449,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestRedisResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -26455,7 +26457,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -26480,7 +26482,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestRedisResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -26495,12 +26497,12 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestRedisResourcePromise { + withReferenceExternalService(externalService: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestRedisResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -26565,22 +26567,22 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + waitFor(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + waitForStart(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestRedisResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -26590,7 +26592,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestRedisResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -26630,12 +26632,12 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + withParentRelationship(parent: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + withChildRelationship(child: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -26790,7 +26792,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestRedisResourcePromise { + testWaitFor(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } @@ -26810,12 +26812,12 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withDependency(dependency: Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestRedisResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -26902,7 +26904,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { export interface TestVaultResource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withContainerRegistry(registry: Awaitable): TestVaultResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise; withEntrypoint(entrypoint: string): TestVaultResourcePromise; withImageTag(tag: string): TestVaultResourcePromise; @@ -26915,8 +26917,8 @@ export interface TestVaultResource { publishAsContainer(): TestVaultResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise; withContainerName(name: string): TestVaultResourcePromise; - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; + withBuildArg(name: string, value: Awaitable): TestVaultResourcePromise; + withBuildSecret(name: string, value: Awaitable): TestVaultResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestVaultResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise; withContainerNetworkAlias(alias: string): TestVaultResourcePromise; @@ -26925,18 +26927,18 @@ export interface TestVaultResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise; publishAsConnectionString(): TestVaultResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestVaultResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): TestVaultResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestVaultResourcePromise; withArgs(args: string[]): TestVaultResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestVaultResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): TestVaultResourcePromise; withReferenceUri(name: string, uri: string): TestVaultResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; + withReferenceExternalService(externalService: Awaitable): TestVaultResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): TestVaultResourcePromise; withEndpoint(options?: WithEndpointOptions): TestVaultResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestVaultResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestVaultResourcePromise; @@ -26949,12 +26951,12 @@ export interface TestVaultResource { withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestVaultResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestVaultResourcePromise; excludeFromManifest(): TestVaultResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitFor(dependency: Awaitable): TestVaultResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitForStart(dependency: Awaitable): TestVaultResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise; withExplicitStart(): TestVaultResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestVaultResourcePromise; withHealthCheck(key: string): TestVaultResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestVaultResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise; @@ -26962,8 +26964,8 @@ export interface TestVaultResource { withCertificateTrustScope(scope: CertificateTrustScope): TestVaultResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestVaultResourcePromise; withoutHttpsCertificate(): TestVaultResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withParentRelationship(parent: Awaitable): TestVaultResourcePromise; + withChildRelationship(child: Awaitable): TestVaultResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestVaultResourcePromise; excludeFromMcp(): TestVaultResourcePromise; @@ -26988,9 +26990,9 @@ export interface TestVaultResource { withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + testWaitFor(dependency: Awaitable): TestVaultResourcePromise; + withDependency(dependency: Awaitable): TestVaultResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -27006,7 +27008,7 @@ export interface TestVaultResource { } export interface TestVaultResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withContainerRegistry(registry: Awaitable): TestVaultResourcePromise; withBindMount(source: string, target: string, options?: WithBindMountOptions): TestVaultResourcePromise; withEntrypoint(entrypoint: string): TestVaultResourcePromise; withImageTag(tag: string): TestVaultResourcePromise; @@ -27019,8 +27021,8 @@ export interface TestVaultResourcePromise extends PromiseLike publishAsContainer(): TestVaultResourcePromise; withDockerfile(contextPath: string, options?: WithDockerfileOptions): TestVaultResourcePromise; withContainerName(name: string): TestVaultResourcePromise; - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise; + withBuildArg(name: string, value: Awaitable): TestVaultResourcePromise; + withBuildSecret(name: string, value: Awaitable): TestVaultResourcePromise; withEndpointProxySupport(proxyEnabled: boolean): TestVaultResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): TestVaultResourcePromise; withContainerNetworkAlias(alias: string): TestVaultResourcePromise; @@ -27029,18 +27031,18 @@ export interface TestVaultResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise; publishAsConnectionString(): TestVaultResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestVaultResourcePromise; + withEnvironmentParameter(name: string, parameter: Awaitable): TestVaultResourcePromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestVaultResourcePromise; withArgs(args: string[]): TestVaultResourcePromise; withArgsCallback(callback: (obj: CommandLineArgsCallbackContext) => Promise): TestVaultResourcePromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise; + withReference(source: Awaitable, options?: WithReferenceOptions): TestVaultResourcePromise; withReferenceUri(name: string, uri: string): TestVaultResourcePromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise; + withReferenceExternalService(externalService: Awaitable): TestVaultResourcePromise; + withReferenceEndpoint(endpointReference: Awaitable): TestVaultResourcePromise; withEndpoint(options?: WithEndpointOptions): TestVaultResourcePromise; withHttpEndpoint(options?: WithHttpEndpointOptions): TestVaultResourcePromise; withHttpsEndpoint(options?: WithHttpsEndpointOptions): TestVaultResourcePromise; @@ -27053,12 +27055,12 @@ export interface TestVaultResourcePromise extends PromiseLike withUrlForEndpoint(endpointName: string, callback: (obj: ResourceUrlAnnotation) => Promise): TestVaultResourcePromise; withUrlForEndpointFactory(endpointName: string, callback: (arg: EndpointReference) => Promise): TestVaultResourcePromise; excludeFromManifest(): TestVaultResourcePromise; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitFor(dependency: Awaitable): TestVaultResourcePromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise; + waitForStart(dependency: Awaitable): TestVaultResourcePromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise; withExplicitStart(): TestVaultResourcePromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestVaultResourcePromise; withHealthCheck(key: string): TestVaultResourcePromise; withHttpHealthCheck(options?: WithHttpHealthCheckOptions): TestVaultResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): TestVaultResourcePromise; @@ -27066,8 +27068,8 @@ export interface TestVaultResourcePromise extends PromiseLike withCertificateTrustScope(scope: CertificateTrustScope): TestVaultResourcePromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): TestVaultResourcePromise; withoutHttpsCertificate(): TestVaultResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; + withParentRelationship(parent: Awaitable): TestVaultResourcePromise; + withChildRelationship(child: Awaitable): TestVaultResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): TestVaultResourcePromise; withHttpProbe(probeType: ProbeType, options?: WithHttpProbeOptions): TestVaultResourcePromise; excludeFromMcp(): TestVaultResourcePromise; @@ -27092,9 +27094,9 @@ export interface TestVaultResourcePromise extends PromiseLike withStatus(status: TestResourceStatus): TestVaultResourcePromise; withNestedConfig(config: TestNestedDto): TestVaultResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): TestVaultResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise; + testWaitFor(dependency: Awaitable): TestVaultResourcePromise; + withDependency(dependency: Awaitable): TestVaultResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise; withEndpoints(endpoints: string[]): TestVaultResourcePromise; withEnvironmentVariables(variables: Record): TestVaultResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): TestVaultResourcePromise; @@ -27119,7 +27121,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -27130,7 +27132,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + withContainerRegistry(registry: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -27323,7 +27325,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withBuildArgInternal(name: string, value: ParameterResource | PromiseLike): Promise { + private async _withBuildArgInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -27334,12 +27336,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + withBuildArg(name: string, value: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withBuildArgInternal(name, value), this._client); } /** @internal */ - private async _withBuildSecretInternal(name: string, value: ParameterResource | PromiseLike): Promise { + private async _withBuildSecretInternal(name: string, value: Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -27350,7 +27352,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + withBuildSecret(name: string, value: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withBuildSecretInternal(name, value), this._client); } @@ -27485,7 +27487,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -27496,7 +27498,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -27540,7 +27542,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentEndpointInternal(name: string, endpointReference: EndpointReference | PromiseLike): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -27554,12 +27556,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -27573,12 +27575,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -27592,7 +27594,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } @@ -27632,7 +27634,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -27646,7 +27648,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): TestVaultResourcePromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -27669,7 +27671,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withReferenceExternalServiceInternal(externalService: ExternalServiceResource | PromiseLike): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -27680,12 +27682,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise { + withReferenceExternalService(externalService: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -27696,7 +27698,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -27930,7 +27932,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -27941,12 +27943,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + waitFor(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -27957,12 +27959,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -27973,12 +27975,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + waitForStart(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -27989,7 +27991,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } @@ -28009,7 +28011,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -28021,7 +28023,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestVaultResourcePromise { const exitCode = options?.exitCode; return new TestVaultResourcePromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -28115,7 +28117,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withHttpsDeveloperCertificateInternal(password?: ParameterResource | PromiseLike): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -28148,7 +28150,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -28159,12 +28161,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + withParentRelationship(parent: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -28175,7 +28177,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + withChildRelationship(child: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -28618,7 +28620,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -28629,12 +28631,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + testWaitFor(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -28645,12 +28647,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withDependency(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -28661,7 +28663,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -28877,7 +28879,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + withContainerRegistry(registry: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -28942,12 +28944,12 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Adds a build argument from a parameter resource */ - withBuildArg(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + withBuildArg(name: string, value: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBuildArg(name, value)), this._client); } /** Adds a build secret from a parameter resource */ - withBuildSecret(name: string, value: ParameterResource | PromiseLike): TestVaultResourcePromise { + withBuildSecret(name: string, value: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withBuildSecret(name, value)), this._client); } @@ -28992,7 +28994,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): TestVaultResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -29013,7 +29015,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -29021,7 +29023,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): TestVaultResourcePromise { + withEnvironmentParameter(name: string, parameter: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -29029,7 +29031,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } @@ -29044,7 +29046,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): TestVaultResourcePromise { + withReference(source: Awaitable, options?: WithReferenceOptions): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -29054,12 +29056,12 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): TestVaultResourcePromise { + withReferenceExternalService(externalService: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): TestVaultResourcePromise { + withReferenceEndpoint(endpointReference: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -29124,22 +29126,22 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + waitFor(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + waitForStart(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): TestVaultResourcePromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } @@ -29149,7 +29151,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): TestVaultResourcePromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } @@ -29189,12 +29191,12 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + withParentRelationship(parent: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + withChildRelationship(child: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -29319,17 +29321,17 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): TestVaultResourcePromise { + testWaitFor(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withDependency(dependency: Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): TestVaultResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -29486,11 +29488,11 @@ class ComputeResourcePromiseImpl implements ComputeResourcePromise { export interface ContainerFilesDestinationResource { toJSON(): MarshalledHandle; - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ContainerFilesDestinationResourcePromise; + publishWithContainerFiles(source: Awaitable, destinationPath: string): ContainerFilesDestinationResourcePromise; } export interface ContainerFilesDestinationResourcePromise extends PromiseLike { - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ContainerFilesDestinationResourcePromise; + publishWithContainerFiles(source: Awaitable, destinationPath: string): ContainerFilesDestinationResourcePromise; } // ============================================================================ @@ -29503,7 +29505,7 @@ class ContainerFilesDestinationResourceImpl extends ResourceBuilderBase, destinationPath: string): Promise { + private async _publishWithContainerFilesInternal(source: Awaitable, destinationPath: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source, destinationPath }; const result = await this._client.invokeCapability( @@ -29514,7 +29516,7 @@ class ContainerFilesDestinationResourceImpl extends ResourceBuilderBase, destinationPath: string): ContainerFilesDestinationResourcePromise { + publishWithContainerFiles(source: Awaitable, destinationPath: string): ContainerFilesDestinationResourcePromise { return new ContainerFilesDestinationResourcePromiseImpl(this._publishWithContainerFilesInternal(source, destinationPath), this._client); } @@ -29538,7 +29540,7 @@ class ContainerFilesDestinationResourcePromiseImpl implements ContainerFilesDest } /** Configures the resource to copy container files from the specified source during publishing */ - publishWithContainerFiles(source: ResourceWithContainerFiles | PromiseLike, destinationPath: string): ContainerFilesDestinationResourcePromise { + publishWithContainerFiles(source: Awaitable, destinationPath: string): ContainerFilesDestinationResourcePromise { return new ContainerFilesDestinationResourcePromiseImpl(this._promise.then(obj => obj.publishWithContainerFiles(source, destinationPath)), this._client); } @@ -29550,7 +29552,7 @@ class ContainerFilesDestinationResourcePromiseImpl implements ContainerFilesDest export interface Resource { toJSON(): MarshalledHandle; - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withContainerRegistry(registry: Awaitable): ResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ResourcePromise; @@ -29561,8 +29563,8 @@ export interface Resource { withExplicitStart(): ResourcePromise; withHealthCheck(key: string): ResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withParentRelationship(parent: Awaitable): ResourcePromise; + withChildRelationship(child: Awaitable): ResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise; excludeFromMcp(): ResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ResourcePromise; @@ -29581,9 +29583,9 @@ export interface Resource { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + testWaitFor(dependency: Awaitable): ResourcePromise; + withDependency(dependency: Awaitable): ResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -29597,7 +29599,7 @@ export interface Resource { } export interface ResourcePromise extends PromiseLike { - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withContainerRegistry(registry: Awaitable): ResourcePromise; withDockerfileBaseImage(options?: WithDockerfileBaseImageOptions): ResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ResourcePromise; withUrlsCallback(callback: (obj: ResourceUrlsCallbackContext) => Promise): ResourcePromise; @@ -29608,8 +29610,8 @@ export interface ResourcePromise extends PromiseLike { withExplicitStart(): ResourcePromise; withHealthCheck(key: string): ResourcePromise; withCommand(name: string, displayName: string, executeCommand: (arg: ExecuteCommandContext) => Promise, options?: WithCommandOptions): ResourcePromise; - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; + withParentRelationship(parent: Awaitable): ResourcePromise; + withChildRelationship(child: Awaitable): ResourcePromise; withIconName(iconName: string, options?: WithIconNameOptions): ResourcePromise; excludeFromMcp(): ResourcePromise; withPipelineStepFactory(stepName: string, callback: (arg: PipelineStepContext) => Promise, options?: WithPipelineStepFactoryOptions): ResourcePromise; @@ -29628,9 +29630,9 @@ export interface ResourcePromise extends PromiseLike { withStatus(status: TestResourceStatus): ResourcePromise; withNestedConfig(config: TestNestedDto): ResourcePromise; withValidator(validator: (arg: TestResourceContext) => Promise): ResourcePromise; - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise; - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise; + testWaitFor(dependency: Awaitable): ResourcePromise; + withDependency(dependency: Awaitable): ResourcePromise; + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise; withEndpoints(endpoints: string[]): ResourcePromise; withCancellableOperation(operation: (arg: CancellationToken) => Promise): ResourcePromise; withMergeLabel(label: string): ResourcePromise; @@ -29653,7 +29655,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** @internal */ - private async _withContainerRegistryInternal(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withContainerRegistryInternal(registry: Awaitable): Promise { registry = isPromiseLike(registry) ? await registry : registry; const rpcArgs: Record = { builder: this._handle, registry }; const result = await this._client.invokeCapability( @@ -29664,7 +29666,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + withContainerRegistry(registry: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._withContainerRegistryInternal(registry), this._client); } @@ -29846,7 +29848,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** @internal */ - private async _withParentRelationshipInternal(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withParentRelationshipInternal(parent: Awaitable): Promise { parent = isPromiseLike(parent) ? await parent : parent; const rpcArgs: Record = { builder: this._handle, parent }; const result = await this._client.invokeCapability( @@ -29857,12 +29859,12 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + withParentRelationship(parent: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._withParentRelationshipInternal(parent), this._client); } /** @internal */ - private async _withChildRelationshipInternal(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _withChildRelationshipInternal(child: Awaitable): Promise { child = isPromiseLike(child) ? await child : child; const rpcArgs: Record = { builder: this._handle, child }; const result = await this._client.invokeCapability( @@ -29873,7 +29875,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + withChildRelationship(child: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._withChildRelationshipInternal(child), this._client); } @@ -30198,7 +30200,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** @internal */ - private async _testWaitForInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _testWaitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -30209,12 +30211,12 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + testWaitFor(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._testWaitForInternal(dependency), this._client); } /** @internal */ - private async _withDependencyInternal(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withDependencyInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -30225,12 +30227,12 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withDependency(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._withDependencyInternal(dependency), this._client); } /** @internal */ - private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withUnionDependencyInternal(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -30241,7 +30243,7 @@ class ResourceImpl extends ResourceBuilderBase implements Resou } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._withUnionDependencyInternal(dependency), this._client); } @@ -30427,7 +30429,7 @@ class ResourcePromiseImpl implements ResourcePromise { } /** Configures a resource to use a container registry */ - withContainerRegistry(registry: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + withContainerRegistry(registry: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.withContainerRegistry(registry)), this._client); } @@ -30482,12 +30484,12 @@ class ResourcePromiseImpl implements ResourcePromise { } /** Sets the parent relationship */ - withParentRelationship(parent: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + withParentRelationship(parent: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.withParentRelationship(parent)), this._client); } /** Sets a child relationship */ - withChildRelationship(child: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + withChildRelationship(child: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.withChildRelationship(child)), this._client); } @@ -30582,17 +30584,17 @@ class ResourcePromiseImpl implements ResourcePromise { } /** Waits for another resource (test version) */ - testWaitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourcePromise { + testWaitFor(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.testWaitFor(dependency)), this._client); } /** Adds a dependency on another resource */ - withDependency(dependency: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withDependency(dependency: Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.withDependency(dependency)), this._client); } /** Adds a dependency from a string or another resource */ - withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourcePromise { + withUnionDependency(dependency: string | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | Awaitable): ResourcePromise { return new ResourcePromiseImpl(this._promise.then(obj => obj.withUnionDependency(dependency)), this._client); } @@ -31352,16 +31354,16 @@ export interface ResourceWithEnvironment { toJSON(): MarshalledHandle; withOtlpExporter(): ResourceWithEnvironmentPromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ResourceWithEnvironmentPromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ResourceWithEnvironmentPromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ResourceWithEnvironmentPromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourceWithEnvironmentPromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ResourceWithEnvironmentPromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ResourceWithEnvironmentPromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ResourceWithEnvironmentPromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; withReferenceUri(name: string, uri: string): ResourceWithEnvironmentPromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ResourceWithEnvironmentPromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; + withReferenceExternalService(externalService: Awaitable): ResourceWithEnvironmentPromise; + withReferenceEndpoint(endpointReference: Awaitable): ResourceWithEnvironmentPromise; withDeveloperCertificateTrust(trust: boolean): ResourceWithEnvironmentPromise; withCertificateTrustScope(scope: CertificateTrustScope): ResourceWithEnvironmentPromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ResourceWithEnvironmentPromise; @@ -31373,16 +31375,16 @@ export interface ResourceWithEnvironment { export interface ResourceWithEnvironmentPromise extends PromiseLike { withOtlpExporter(): ResourceWithEnvironmentPromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ResourceWithEnvironmentPromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ResourceWithEnvironmentPromise; - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ResourceWithEnvironmentPromise; - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourceWithEnvironmentPromise; - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ResourceWithEnvironmentPromise; + withEnvironmentParameter(name: string, parameter: Awaitable): ResourceWithEnvironmentPromise; + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ResourceWithEnvironmentPromise; + withReference(source: Awaitable, options?: WithReferenceOptions): ResourceWithEnvironmentPromise; withReferenceUri(name: string, uri: string): ResourceWithEnvironmentPromise; - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ResourceWithEnvironmentPromise; - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise; + withReferenceExternalService(externalService: Awaitable): ResourceWithEnvironmentPromise; + withReferenceEndpoint(endpointReference: Awaitable): ResourceWithEnvironmentPromise; withDeveloperCertificateTrust(trust: boolean): ResourceWithEnvironmentPromise; withCertificateTrustScope(scope: CertificateTrustScope): ResourceWithEnvironmentPromise; withHttpsDeveloperCertificate(options?: WithHttpsDeveloperCertificateOptions): ResourceWithEnvironmentPromise; @@ -31431,7 +31433,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -31442,7 +31444,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentInternal(name, value), this._client); } @@ -31486,7 +31488,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentEndpointInternal(name: string, endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, name, endpointReference }; const result = await this._client.invokeCapability( @@ -31500,12 +31502,12 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentEndpointInternal(name, endpointReference), this._client); } /** @internal */ - private async _withEnvironmentParameterInternal(name: string, parameter: ParameterResource | PromiseLike): Promise { + private async _withEnvironmentParameterInternal(name: string, parameter: Awaitable): Promise { parameter = isPromiseLike(parameter) ? await parameter : parameter; const rpcArgs: Record = { builder: this._handle, name, parameter }; const result = await this._client.invokeCapability( @@ -31519,12 +31521,12 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentParameterInternal(name, parameter), this._client); } /** @internal */ - private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): Promise { + private async _withEnvironmentConnectionStringInternal(envVarName: string, resource: Awaitable): Promise { resource = isPromiseLike(resource) ? await resource : resource; const rpcArgs: Record = { builder: this._handle, envVarName, resource }; const result = await this._client.invokeCapability( @@ -31538,12 +31540,12 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentConnectionStringInternal(envVarName, resource), this._client); } /** @internal */ - private async _withReferenceInternal(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, connectionName?: string, optional?: boolean, name?: string): Promise { + private async _withReferenceInternal(source: Awaitable, connectionName?: string, optional?: boolean, name?: string): Promise { source = isPromiseLike(source) ? await source : source; const rpcArgs: Record = { builder: this._handle, source }; if (connectionName !== undefined) rpcArgs.connectionName = connectionName; @@ -31557,7 +31559,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { const connectionName = options?.connectionName; const optional = options?.optional; const name = options?.name; @@ -31580,7 +31582,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { + private async _withReferenceExternalServiceInternal(externalService: Awaitable): Promise { externalService = isPromiseLike(externalService) ? await externalService : externalService; const rpcArgs: Record = { builder: this._handle, externalService }; const result = await this._client.invokeCapability( @@ -31591,12 +31593,12 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + withReferenceExternalService(externalService: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._withReferenceExternalServiceInternal(externalService), this._client); } /** @internal */ - private async _withReferenceEndpointInternal(endpointReference: EndpointReference | PromiseLike): Promise { + private async _withReferenceEndpointInternal(endpointReference: Awaitable): Promise { endpointReference = isPromiseLike(endpointReference) ? await endpointReference : endpointReference; const rpcArgs: Record = { builder: this._handle, endpointReference }; const result = await this._client.invokeCapability( @@ -31607,7 +31609,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + withReferenceEndpoint(endpointReference: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._withReferenceEndpointInternal(endpointReference), this._client); } @@ -31642,7 +31644,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { + private async _withHttpsDeveloperCertificateInternal(password?: Awaitable): Promise { password = isPromiseLike(password) ? await password : password; const rpcArgs: Record = { builder: this._handle }; if (password !== undefined) rpcArgs.password = password; @@ -31739,7 +31741,7 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | PromiseLike | ParameterResource | PromiseLike | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike | EndpointReferenceExpression): ResourceWithEnvironmentPromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -31760,7 +31762,7 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi * Sets an environment variable from an endpoint reference * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentEndpoint(name: string, endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise { + withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentEndpoint(name, endpointReference)), this._client); } @@ -31768,7 +31770,7 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi * Sets an environment variable from a parameter resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentParameter(name: string, parameter: ParameterResource | PromiseLike): ResourceWithEnvironmentPromise { + withEnvironmentParameter(name: string, parameter: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentParameter(name, parameter)), this._client); } @@ -31776,12 +31778,12 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi * Sets an environment variable from a connection string resource * @deprecated ATS compatibility shim. Use withEnvironment instead. */ - withEnvironmentConnectionString(envVarName: string, resource: ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | PromiseLike): ResourceWithEnvironmentPromise { + withEnvironmentConnectionString(envVarName: string, resource: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironmentConnectionString(envVarName, resource)), this._client); } /** Adds a reference to another resource */ - withReference(source: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { + withReference(source: Awaitable, options?: WithReferenceOptions): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReference(source, options)), this._client); } @@ -31791,12 +31793,12 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi } /** Adds a reference to an external service */ - withReferenceExternalService(externalService: ExternalServiceResource | PromiseLike): ResourceWithEnvironmentPromise { + withReferenceExternalService(externalService: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceExternalService(externalService)), this._client); } /** Adds a reference to an endpoint */ - withReferenceEndpoint(endpointReference: EndpointReference | PromiseLike): ResourceWithEnvironmentPromise { + withReferenceEndpoint(endpointReference: Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withReferenceEndpoint(endpointReference)), this._client); } @@ -31838,19 +31840,19 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi export interface ResourceWithWaitSupport { toJSON(): MarshalledHandle; - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; + waitFor(dependency: Awaitable): ResourceWithWaitSupportPromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForStart(dependency: Awaitable): ResourceWithWaitSupportPromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; } export interface ResourceWithWaitSupportPromise extends PromiseLike { - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise; - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; + waitFor(dependency: Awaitable): ResourceWithWaitSupportPromise; + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForStart(dependency: Awaitable): ResourceWithWaitSupportPromise; + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise; + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise; } // ============================================================================ @@ -31863,7 +31865,7 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase): Promise { + private async _waitForInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -31874,12 +31876,12 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase): ResourceWithWaitSupportPromise { + waitFor(dependency: Awaitable): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._waitForInternal(dependency), this._client); } /** @internal */ - private async _waitForWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -31890,12 +31892,12 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._waitForWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForStartInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): Promise { + private async _waitForStartInternal(dependency: Awaitable): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; const result = await this._client.invokeCapability( @@ -31906,12 +31908,12 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase): ResourceWithWaitSupportPromise { + waitForStart(dependency: Awaitable): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._waitForStartInternal(dependency), this._client); } /** @internal */ - private async _waitForStartWithBehaviorInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): Promise { + private async _waitForStartWithBehaviorInternal(dependency: Awaitable, waitBehavior: WaitBehavior): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency, waitBehavior }; const result = await this._client.invokeCapability( @@ -31922,12 +31924,12 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._waitForStartWithBehaviorInternal(dependency, waitBehavior), this._client); } /** @internal */ - private async _waitForCompletionInternal(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, exitCode?: number): Promise { + private async _waitForCompletionInternal(dependency: Awaitable, exitCode?: number): Promise { dependency = isPromiseLike(dependency) ? await dependency : dependency; const rpcArgs: Record = { builder: this._handle, dependency }; if (exitCode !== undefined) rpcArgs.exitCode = exitCode; @@ -31939,7 +31941,7 @@ class ResourceWithWaitSupportImpl extends ResourceBuilderBase, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { const exitCode = options?.exitCode; return new ResourceWithWaitSupportPromiseImpl(this._waitForCompletionInternal(dependency, exitCode), this._client); } @@ -31964,27 +31966,27 @@ class ResourceWithWaitSupportPromiseImpl implements ResourceWithWaitSupportPromi } /** Waits for another resource to be ready */ - waitFor(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise { + waitFor(dependency: Awaitable): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitFor(dependency)), this._client); } /** Waits for another resource with specific behavior */ - waitForWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + waitForWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for another resource to start */ - waitForStart(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike): ResourceWithWaitSupportPromise { + waitForStart(dependency: Awaitable): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForStart(dependency)), this._client); } /** Waits for another resource to start with specific behavior */ - waitForStartWithBehavior(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { + waitForStartWithBehavior(dependency: Awaitable, waitBehavior: WaitBehavior): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForStartWithBehavior(dependency, waitBehavior)), this._client); } /** Waits for resource completion */ - waitForCompletion(dependency: CSharpAppResource | ComputeResource | ConnectionStringResource | ContainerFilesDestinationResource | ContainerRegistryResource | ContainerResource | DotnetToolResource | ExecutableResource | ExternalServiceResource | ParameterResource | ProjectResource | Resource | ResourceWithArgs | ResourceWithConnectionString | ResourceWithContainerFiles | ResourceWithEndpoints | ResourceWithEnvironment | ResourceWithWaitSupport | TestDatabaseResource | TestRedisResource | TestVaultResource | PromiseLike, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { + waitForCompletion(dependency: Awaitable, options?: WaitForCompletionOptions): ResourceWithWaitSupportPromise { return new ResourceWithWaitSupportPromiseImpl(this._promise.then(obj => obj.waitForCompletion(dependency, options)), this._client); } diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/base.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/base.verified.ts index 8d7033494fb..219eee04175 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/base.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/base.verified.ts @@ -7,6 +7,12 @@ export { Handle, AspireClient, CapabilityError, CancellationToken, registerCallb export type { MarshalledHandle, AtsError, AtsErrorDetails, CallbackFunction } from './transport.js'; export { AtsErrorCodes, isMarshalledHandle, isAtsError, wrapIfHandle } from './transport.js'; +/** + * Utility type for parameters that accept either a resolved value or a promise of that value. + * Used by generated APIs to allow passing un-awaited resource builders directly. + */ +export type Awaitable = T | PromiseLike; + // ============================================================================ // Reference Expression // ============================================================================ From ba257db82a6fec6c60583c45b66451f4ffc9db19 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 11:11:38 -0700 Subject: [PATCH 09/13] Re-export Awaitable from aspire.ts for consumer visibility The Awaitable type is used in generated method signatures but was only imported internally. Consumers importing types from aspire.js need it resolved for tsc --noEmit to pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AtsTypeScriptCodeGenerator.cs | 2 +- .../Snapshots/AtsGeneratedAspire.verified.ts | 2 +- .../Snapshots/TwoPassScanningGeneratedAspire.verified.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index a2b0c890b40..7a18e4dc8e8 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -2253,7 +2253,7 @@ export async function createBuilder(options?: CreateBuilderOptions): Promise Date: Sat, 4 Apr 2026 11:52:17 -0700 Subject: [PATCH 10/13] Fix CI: only resolve promise for types actually widened with Awaitable IsWidenedHandleType now checks _wrapperClassNames to match the exact widening logic in MapInputTypeToTypeScript. This excludes special types like ReferenceExpression that are handle-category but not widened, preventing 'Type unknown is not assignable to ReferenceExpression' tsc errors in generated code. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AtsTypeScriptCodeGenerator.cs | 15 ++- .../Snapshots/AtsGeneratedAspire.verified.ts | 2 - ...TwoPassScanningGeneratedAspire.verified.ts | 122 +++++++----------- 3 files changed, 57 insertions(+), 82 deletions(-) diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index 7a18e4dc8e8..5d6c6ebef83 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -1652,16 +1652,25 @@ private void GeneratePromiseResolutionForParam(string paramName, AtsTypeRef? par } /// - /// Checks if a type is a handle type or a union containing handle types. + /// Checks if a type was widened to accept Awaitable<T> in input position. + /// Must match the widening logic in MapInputTypeToTypeScript exactly. /// - private static bool IsWidenedHandleType(AtsTypeRef? typeRef) + private bool IsWidenedHandleType(AtsTypeRef? typeRef) { if (typeRef == null) { return false; } - if (IsHandleType(typeRef)) + // Interface handles are always widened + if (IsInterfaceHandleType(typeRef)) + { + return true; + } + + // Concrete handles are only widened if they have a wrapper class name + // (excludes special types like ReferenceExpression that bypass widening) + if (IsHandleType(typeRef) && _wrapperClassNames.ContainsKey(typeRef.TypeId)) { return true; } diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts index 720c203a222..a85c170a886 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/AtsGeneratedAspire.verified.ts @@ -1421,7 +1421,6 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionStringInternal(connectionString: ReferenceExpression): Promise { - connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', @@ -3309,7 +3308,6 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts index 64952b5c5f3..d592eba150b 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts @@ -1504,8 +1504,6 @@ class EndpointReferenceImpl implements EndpointReference { /** Gets a conditional expression that resolves to the enabledValue when TLS is enabled on the endpoint, or to the disabledValue otherwise. */ async getTlsValue(enabledValue: ReferenceExpression, disabledValue: ReferenceExpression): Promise { - enabledValue = isPromiseLike(enabledValue) ? await enabledValue : enabledValue; - disabledValue = isPromiseLike(disabledValue) ? await disabledValue : disabledValue; const rpcArgs: Record = { context: this._handle, enabledValue, disabledValue }; return await this._client.invokeCapability( 'Aspire.Hosting.ApplicationModel/EndpointReference.getTlsValue', @@ -4063,7 +4061,6 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder /** Adds a connection string with a reference expression */ /** @internal */ async _addConnectionStringExpressionInternal(name: string, connectionStringExpression: ReferenceExpression): Promise { - connectionStringExpression = isPromiseLike(connectionStringExpression) ? await connectionStringExpression : connectionStringExpression; const rpcArgs: Record = { builder: this._handle, name, connectionStringExpression }; const result = await this._client.invokeCapability( 'Aspire.Hosting/addConnectionStringExpression', @@ -4630,7 +4627,6 @@ class DistributedApplicationEventingImpl implements DistributedApplicationEventi /** Invokes the Unsubscribe method */ /** @internal */ async _unsubscribeInternal(subscription: DistributedApplicationEventSubscriptionHandle): Promise { - subscription = isPromiseLike(subscription) ? await subscription : subscription; const rpcArgs: Record = { context: this._handle, subscription }; await this._client.invokeCapability( 'Aspire.Hosting.Eventing/IDistributedApplicationEventing.unsubscribe', @@ -5815,7 +5811,6 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', @@ -5892,7 +5887,6 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -6333,7 +6327,6 @@ class ConnectionStringResourceImpl extends ResourceBuilderBase { - connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', @@ -7184,7 +7177,6 @@ class ContainerRegistryResourceImpl extends ResourceBuilderBase { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -8118,7 +8110,7 @@ export interface ContainerResource { withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise; publishAsConnectionString(): ContainerResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ContainerResourcePromise; @@ -8221,7 +8213,7 @@ export interface ContainerResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): ContainerResourcePromise; publishAsConnectionString(): ContainerResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ContainerResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ContainerResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ContainerResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ContainerResourcePromise; @@ -8676,7 +8668,7 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -8687,13 +8679,12 @@ class ContainerResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -9050,7 +9041,6 @@ class ContainerResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -10168,7 +10158,7 @@ class ContainerResourcePromiseImpl implements ContainerResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ContainerResourcePromise { return new ContainerResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -10581,7 +10571,7 @@ export interface CSharpAppResource { disableForwardedHeaders(): CSharpAppResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): CSharpAppResourcePromise; @@ -10670,7 +10660,7 @@ export interface CSharpAppResourcePromise extends PromiseLike disableForwardedHeaders(): CSharpAppResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): CSharpAppResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): CSharpAppResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): CSharpAppResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): CSharpAppResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): CSharpAppResourcePromise; @@ -10912,7 +10902,7 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -10923,13 +10913,12 @@ class CSharpAppResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -11286,7 +11275,6 @@ class CSharpAppResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -12331,7 +12319,7 @@ class CSharpAppResourcePromiseImpl implements CSharpAppResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): CSharpAppResourcePromise { return new CSharpAppResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -12751,7 +12739,7 @@ export interface DotnetToolResource { withOtlpExporter(): DotnetToolResourcePromise; withOtlpExporterProtocol(protocol: OtlpProtocol): DotnetToolResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): DotnetToolResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): DotnetToolResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): DotnetToolResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): DotnetToolResourcePromise; @@ -12846,7 +12834,7 @@ export interface DotnetToolResourcePromise extends PromiseLike): DotnetToolResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): DotnetToolResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): DotnetToolResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): DotnetToolResourcePromise; @@ -13190,7 +13178,7 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -13201,13 +13189,12 @@ class DotnetToolResourceImpl extends ResourceBuilderBase): DotnetToolResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -13564,7 +13551,6 @@ class DotnetToolResourceImpl extends ResourceBuilderBase { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -14628,7 +14614,7 @@ class DotnetToolResourcePromiseImpl implements DotnetToolResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): DotnetToolResourcePromise { return new DotnetToolResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -15037,7 +15023,7 @@ export interface ExecutableResource { withOtlpExporter(): ExecutableResourcePromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ExecutableResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ExecutableResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ExecutableResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ExecutableResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ExecutableResourcePromise; @@ -15126,7 +15112,7 @@ export interface ExecutableResourcePromise extends PromiseLike): ExecutableResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ExecutableResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ExecutableResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ExecutableResourcePromise; @@ -15380,7 +15366,7 @@ class ExecutableResourceImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -15391,13 +15377,12 @@ class ExecutableResourceImpl extends ResourceBuilderBase): ExecutableResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -15754,7 +15739,6 @@ class ExecutableResourceImpl extends ResourceBuilderBase { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -16788,7 +16772,7 @@ class ExecutableResourcePromiseImpl implements ExecutableResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ExecutableResourcePromise { return new ExecutableResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -17401,7 +17385,6 @@ class ExternalServiceResourceImpl extends ResourceBuilderBase { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -18529,7 +18512,6 @@ class ParameterResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -19454,7 +19436,7 @@ export interface ProjectResource { disableForwardedHeaders(): ProjectResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ProjectResourcePromise; @@ -19543,7 +19525,7 @@ export interface ProjectResourcePromise extends PromiseLike { disableForwardedHeaders(): ProjectResourcePromise; publishAsDockerFile(options?: PublishAsDockerFileOptions): ProjectResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): ProjectResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ProjectResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ProjectResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ProjectResourcePromise; @@ -19785,7 +19767,7 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -19796,13 +19778,12 @@ class ProjectResourceImpl extends ResourceBuilderBase imp } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -20159,7 +20140,6 @@ class ProjectResourceImpl extends ResourceBuilderBase imp /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -21204,7 +21184,7 @@ class ProjectResourcePromiseImpl implements ProjectResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ProjectResourcePromise { return new ProjectResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -21631,7 +21611,7 @@ export interface TestDatabaseResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestDatabaseResourcePromise; publishAsConnectionString(): TestDatabaseResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestDatabaseResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestDatabaseResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestDatabaseResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestDatabaseResourcePromise; @@ -21734,7 +21714,7 @@ export interface TestDatabaseResourcePromise extends PromiseLike): TestDatabaseResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestDatabaseResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestDatabaseResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestDatabaseResourcePromise; @@ -22189,7 +22169,7 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -22200,13 +22180,12 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase): TestDatabaseResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -22563,7 +22542,6 @@ class TestDatabaseResourceImpl extends ResourceBuilderBase { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -23681,7 +23659,7 @@ class TestDatabaseResourcePromiseImpl implements TestDatabaseResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestDatabaseResourcePromise { return new TestDatabaseResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -24108,7 +24086,7 @@ export interface TestRedisResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise; publishAsConnectionString(): TestRedisResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestRedisResourcePromise; @@ -24227,7 +24205,7 @@ export interface TestRedisResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): TestRedisResourcePromise; publishAsConnectionString(): TestRedisResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestRedisResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestRedisResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestRedisResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestRedisResourcePromise; @@ -24698,7 +24676,7 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -24709,13 +24687,12 @@ class TestRedisResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -24811,7 +24788,6 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionPropertyInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', @@ -25112,7 +25088,6 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -25807,7 +25782,6 @@ class TestRedisResourceImpl extends ResourceBuilderBase /** @internal */ private async _withConnectionStringInternal(connectionString: ReferenceExpression): Promise { - connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', @@ -26420,7 +26394,7 @@ class TestRedisResourcePromiseImpl implements TestRedisResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestRedisResourcePromise { return new TestRedisResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -26927,7 +26901,7 @@ export interface TestVaultResource { withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise; publishAsConnectionString(): TestVaultResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestVaultResourcePromise; @@ -27031,7 +27005,7 @@ export interface TestVaultResourcePromise extends PromiseLike withOtlpExporterProtocol(protocol: OtlpProtocol): TestVaultResourcePromise; publishAsConnectionString(): TestVaultResourcePromise; withRequiredCommand(command: string, options?: WithRequiredCommandOptions): TestVaultResourcePromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise; withEnvironmentExpression(name: string, value: ReferenceExpression): TestVaultResourcePromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): TestVaultResourcePromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): TestVaultResourcePromise; @@ -27487,7 +27461,7 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** @internal */ - private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -27498,13 +27472,12 @@ class TestVaultResourceImpl extends ResourceBuilderBase } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -27861,7 +27834,6 @@ class TestVaultResourceImpl extends ResourceBuilderBase /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -28994,7 +28966,7 @@ class TestVaultResourcePromiseImpl implements TestVaultResourcePromise { } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): TestVaultResourcePromise { return new TestVaultResourcePromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } @@ -29745,7 +29717,6 @@ class ResourceImpl extends ResourceBuilderBase implements Resou /** @internal */ private async _withUrlExpressionInternal(url: ReferenceExpression, displayText?: string): Promise { - url = isPromiseLike(url) ? await url : url; const rpcArgs: Record = { builder: this._handle, url }; if (displayText !== undefined) rpcArgs.displayText = displayText; const result = await this._client.invokeCapability( @@ -30774,7 +30745,6 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withConnectionProperty', @@ -30834,7 +30804,6 @@ class ResourceWithConnectionStringImpl extends ResourceBuilderBase { - connectionString = isPromiseLike(connectionString) ? await connectionString : connectionString; const rpcArgs: Record = { builder: this._handle, connectionString }; const result = await this._client.invokeCapability( 'Aspire.Hosting.CodeGeneration.TypeScript.Tests/withConnectionString', @@ -31354,7 +31323,7 @@ export interface ResourceWithEnvironment { toJSON(): MarshalledHandle; withOtlpExporter(): ResourceWithEnvironmentPromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ResourceWithEnvironmentPromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ResourceWithEnvironmentPromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ResourceWithEnvironmentPromise; @@ -31375,7 +31344,7 @@ export interface ResourceWithEnvironment { export interface ResourceWithEnvironmentPromise extends PromiseLike { withOtlpExporter(): ResourceWithEnvironmentPromise; withOtlpExporterProtocol(protocol: OtlpProtocol): ResourceWithEnvironmentPromise; - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise; + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise; withEnvironmentExpression(name: string, value: ReferenceExpression): ResourceWithEnvironmentPromise; withEnvironmentCallback(callback: (arg: EnvironmentCallbackContext) => Promise): ResourceWithEnvironmentPromise; withEnvironmentEndpoint(name: string, endpointReference: Awaitable): ResourceWithEnvironmentPromise; @@ -31433,7 +31402,7 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): Promise { + private async _withEnvironmentInternal(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): Promise { value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( @@ -31444,13 +31413,12 @@ class ResourceWithEnvironmentImpl extends ResourceBuilderBase): ResourceWithEnvironmentPromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._withEnvironmentInternal(name, value), this._client); } /** @internal */ private async _withEnvironmentExpressionInternal(name: string, value: ReferenceExpression): Promise { - value = isPromiseLike(value) ? await value : value; const rpcArgs: Record = { builder: this._handle, name, value }; const result = await this._client.invokeCapability( 'Aspire.Hosting/withEnvironmentExpression', @@ -31741,7 +31709,7 @@ class ResourceWithEnvironmentPromiseImpl implements ResourceWithEnvironmentPromi } /** Sets an environment variable */ - withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise { + withEnvironment(name: string, value: string | ReferenceExpression | EndpointReference | ParameterResource | ConnectionStringResource | ResourceWithConnectionString | TestRedisResource | EndpointReferenceExpression | Awaitable): ResourceWithEnvironmentPromise { return new ResourceWithEnvironmentPromiseImpl(this._promise.then(obj => obj.withEnvironment(name, value)), this._client); } From e71dd976711b5d3fdbbdf77009d4109367c9f7ce Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 14:17:40 -0700 Subject: [PATCH 11/13] Fix CI: update e2e test for auto-resolve promise behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RunWithMissingAwaitShowsHelpfulError → RunWithMissingAwaitSucceedsWithAutoResolve Now that withReference accepts PromiseLike, un-awaited chains work correctly and the app starts successfully instead of showing an error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../TypeScriptCodegenValidationTests.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs b/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs index ef8ff4add5f..25c40b8ff52 100644 --- a/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs +++ b/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs @@ -97,7 +97,7 @@ public async Task RestoreGeneratesSdkFiles() } [Fact] - public async Task RunWithMissingAwaitShowsHelpfulError() + public async Task RunWithMissingAwaitSucceedsWithAutoResolve() { using var workspace = TemporaryWorkspace.Create(output); @@ -155,10 +155,11 @@ await builder.addContainer("consumer", "nginx") await auto.TypeAsync("aspire run"); await auto.EnterAsync(); + // With auto-resolve promises, un-awaited chains now work correctly. + // The app should start successfully — withReference accepts PromiseLike. await auto.WaitUntilAsync(s => - s.ContainsText("❌ AppHost Error:") && - s.ContainsText("Did you forget 'await'"), - timeout: TimeSpan.FromMinutes(3), description: "waiting for AppHost error with await hint"); + s.ContainsText("Dashboard:") || s.ContainsText("Press CTRL+C"), + timeout: TimeSpan.FromMinutes(3), description: "waiting for AppHost to start successfully with un-awaited promises"); await auto.WaitForAnyPromptAsync(counter); await auto.TypeAsync("exit"); await auto.EnterAsync(); From 5ffeda9608401d1fae6d889bb79855385aaa2e00 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sat, 4 Apr 2026 19:07:12 -0700 Subject: [PATCH 12/13] Fix CI: use tsc --noEmit instead of aspire run for auto-resolve test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The e2e test was timing out because aspire run needs PostgreSQL/DCP which isn't available in this CI environment. Use tsc --noEmit instead to validate that un-awaited chains (withReference on PromiseLike) compile without type errors — which is the actual behavior being tested. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../TypeScriptCodegenValidationTests.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs b/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs index 25c40b8ff52..4785a067d35 100644 --- a/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs +++ b/tests/Aspire.Cli.EndToEnd.Tests/TypeScriptCodegenValidationTests.cs @@ -97,7 +97,7 @@ public async Task RestoreGeneratesSdkFiles() } [Fact] - public async Task RunWithMissingAwaitSucceedsWithAutoResolve() + public async Task UnAwaitedChainsCompileWithAutoResolvePromises() { using var workspace = TemporaryWorkspace.Create(output); @@ -153,14 +153,12 @@ await builder.addContainer("consumer", "nginx") File.WriteAllText(appHostPath, newContent); - await auto.TypeAsync("aspire run"); + // Validate that un-awaited chains compile without type errors. + // withReference(db) should accept PromiseLike from the un-awaited addDatabase(). + await auto.TypeAsync("npx tsc --noEmit"); await auto.EnterAsync(); - // With auto-resolve promises, un-awaited chains now work correctly. - // The app should start successfully — withReference accepts PromiseLike. - await auto.WaitUntilAsync(s => - s.ContainsText("Dashboard:") || s.ContainsText("Press CTRL+C"), - timeout: TimeSpan.FromMinutes(3), description: "waiting for AppHost to start successfully with un-awaited promises"); - await auto.WaitForAnyPromptAsync(counter); + await auto.WaitForSuccessPromptFailFastAsync(counter, TimeSpan.FromMinutes(2)); + await auto.TypeAsync("exit"); await auto.EnterAsync(); From 00b2f0a3bec827ae89114d00a12980f1c2fad67f Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sun, 5 Apr 2026 08:24:36 -0700 Subject: [PATCH 13/13] Address PR review feedback: fix deadlock, unhandled rejection, add comments - Move flushPendingPromises() from _buildInternal to public build() wrapper using async closure pattern to prevent deadlock (JamesNK) - Apply same fix in GenerateTypeClassMethod for type class build() paths - Add .catch(() => {}) to promise.finally() in trackPromise to prevent unhandled rejection crashes in Node.js (JamesNK) - Add console.warn when flushing pending promises to surface implicit flushes - Add explanatory comment on the while loop in flushPendingPromises (JamesNK) - Update doc comment to reflect flush location change - Update snapshots (TwoPassScanning, transport) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../AtsTypeScriptCodeGenerator.cs | 46 +++++++++++++------ .../Resources/transport.ts | 7 ++- ...TwoPassScanningGeneratedAspire.verified.ts | 3 +- .../Snapshots/transport.verified.ts | 9 +++- 4 files changed, 48 insertions(+), 17 deletions(-) diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs index 5d6c6ebef83..251c9f4350a 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/AtsTypeScriptCodeGenerator.cs @@ -1412,7 +1412,6 @@ private void GenerateBuilderClass(BuilderModel builder) /// /// /** @internal */ /// private async _withEnvironmentInternal(name: string, value: string): Promise<RedisResource> { - /// await this._client.flushPendingPromises(); // only emitted for build() /// const rpcArgs: Record<string, unknown> = { builder: this._handle, name, value }; /// const result = await this._client.invokeCapability<RedisResourceHandle>('...', rpcArgs); /// return new RedisResourceImpl(result, this._client); @@ -1422,6 +1421,12 @@ private void GenerateBuilderClass(BuilderModel builder) /// return new RedisResourcePromiseImpl( /// this._withEnvironmentInternal(name, value), this._client); /// } + /// + /// // For build(), the public wrapper flushes pending promises first: + /// build(): DistributedApplicationPromise { + /// const flushAndBuild = async () => { await this._client.flushPendingPromises(); return this._buildInternal(); }; + /// return new DistributedApplicationPromiseImpl(flushAndBuild(), this._client); + /// } /// /// When a parameter is a handle type, promise resolution is emitted before the RPC args /// (e.g. db = isPromiseLike(db) ? await db : db;). @@ -1552,12 +1557,6 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Resolve any promise-like handle parameters before building rpcArgs GeneratePromiseResolution(capability.Parameters); - // Flush pending promises before build to ensure all un-awaited chains complete - if (string.Equals(capability.MethodName, "build", StringComparison.OrdinalIgnoreCase)) - { - WriteLine(" await this._client.flushPendingPromises();"); - } - // Build args object with conditional inclusion GenerateArgsObjectWithConditionals(targetParamName, requiredParams, optionalParams); @@ -1597,9 +1596,21 @@ private void GenerateBuilderMethod(BuilderModel builder, AtsCapabilityInfo capab // Forward all params to internal method var allParamNames = capability.Parameters.Select(p => p.Name); - Write($" return new {promiseImplementationClass}(this.{internalMethodName}("); - Write(string.Join(", ", allParamNames)); - WriteLine("), this._client);"); + var internalCall = $"this.{internalMethodName}({string.Join(", ", allParamNames)})"; + + // For build(), flush pending promises before invoking the internal method. + // This must happen in the public wrapper (not _buildInternal) to avoid deadlock: + // the PromiseImpl constructor tracks the build promise, and if _buildInternal + // awaited flushPendingPromises, the flush would re-await the tracked build promise. + if (string.Equals(capability.MethodName, "build", StringComparison.OrdinalIgnoreCase)) + { + WriteLine($" const flushAndBuild = async () => {{ await this._client.flushPendingPromises(); return {internalCall}; }};"); + WriteLine($" return new {promiseImplementationClass}(flushAndBuild(), this._client);"); + } + else + { + WriteLine($" return new {promiseImplementationClass}({internalCall}, this._client);"); + } WriteLine(" }"); WriteLine(); } @@ -3044,9 +3055,18 @@ private void GenerateTypeClassMethod(BuilderModel model, AtsCapabilityInfo capab WriteLine($" {(IsWidenedHandleType(param.Type) ? "let" : "const")} {param.Name} = options?.{param.Name};"); } - Write($" return new {returnPromiseImplementationClass}(this.{internalMethodName}("); - Write(string.Join(", ", userParams.Select(p => p.Name))); - WriteLine("), this._client);"); + var internalCall = $"this.{internalMethodName}({string.Join(", ", userParams.Select(p => p.Name))})"; + + // For build(), flush pending promises before invoking the internal method to avoid deadlock + if (string.Equals(methodName, "build", StringComparison.OrdinalIgnoreCase)) + { + WriteLine($" const flushAndBuild = async () => {{ await this._client.flushPendingPromises(); return {internalCall}; }};"); + WriteLine($" return new {returnPromiseImplementationClass}(flushAndBuild(), this._client);"); + } + else + { + WriteLine($" return new {returnPromiseImplementationClass}({internalCall}, this._client);"); + } WriteLine(" }"); } else if (isVoid) diff --git a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts index 6db6222eef4..19eeb0a2e3b 100644 --- a/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts +++ b/src/Aspire.Hosting.CodeGeneration.TypeScript/Resources/transport.ts @@ -761,10 +761,15 @@ export class AspireClient implements AspireClientRpc { trackPromise(promise: Promise): void { this._pendingPromises.add(promise); - promise.finally(() => this._pendingPromises.delete(promise)); + promise.finally(() => this._pendingPromises.delete(promise)).catch(() => {}); } async flushPendingPromises(): Promise { + if (this._pendingPromises.size > 0) { + console.warn(`Flushing ${this._pendingPromises.size} pending promise(s). Consider awaiting fluent calls to avoid implicit flushing.`); + } + // Loop because awaiting existing promises may cause new ones to be enqueued. + // Awaiting a tracked promise also removes it from the set via the .finally() handler. while (this._pendingPromises.size > 0) { await Promise.all(this._pendingPromises); } diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts index d592eba150b..c626882108b 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.ts @@ -4055,7 +4055,8 @@ class DistributedApplicationBuilderImpl implements DistributedApplicationBuilder } build(): DistributedApplicationPromise { - return new DistributedApplicationPromiseImpl(this._buildInternal(), this._client); + const flushAndBuild = async () => { await this._client.flushPendingPromises(); return this._buildInternal(); }; + return new DistributedApplicationPromiseImpl(flushAndBuild(), this._client); } /** Adds a connection string with a reference expression */ diff --git a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts index 6db6222eef4..2382fb605b3 100644 --- a/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts +++ b/tests/Aspire.Hosting.CodeGeneration.TypeScript.Tests/Snapshots/transport.verified.ts @@ -1,4 +1,4 @@ -// transport.ts - ATS transport layer: RPC, Handle, errors, callbacks +// transport.ts - ATS transport layer: RPC, Handle, errors, callbacks import * as net from 'net'; import * as rpc from 'vscode-jsonrpc/node.js'; @@ -761,10 +761,15 @@ export class AspireClient implements AspireClientRpc { trackPromise(promise: Promise): void { this._pendingPromises.add(promise); - promise.finally(() => this._pendingPromises.delete(promise)); + promise.finally(() => this._pendingPromises.delete(promise)).catch(() => {}); } async flushPendingPromises(): Promise { + if (this._pendingPromises.size > 0) { + console.warn(`Flushing ${this._pendingPromises.size} pending promise(s). Consider awaiting fluent calls to avoid implicit flushing.`); + } + // Loop because awaiting existing promises may cause new ones to be enqueued. + // Awaiting a tracked promise also removes it from the set via the .finally() handler. while (this._pendingPromises.size > 0) { await Promise.all(this._pendingPromises); }