fix, baselines, CL
This commit is contained in:
parent
ae70447a18
commit
cf6076d6b0
|
@ -1,4 +1,10 @@
|
|||
### Improvements
|
||||
|
||||
- [sdk/nodejs] - Type optional input properties as `Input<T | undefined> | undefined` instead of
|
||||
`Input<T> | undefined`. This allows users to pass `Output<T | undefined>` for optional input
|
||||
properties.
|
||||
[#6323](https://github.com/pulumi/pulumi/pull/6323)
|
||||
|
||||
- Adds CI detector for Buildkite
|
||||
[#7933](https://github.com/pulumi/pulumi/pull/7933)
|
||||
|
||||
|
|
|
@ -60,5 +60,5 @@ export class ModuleResource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a ModuleResource resource.
|
||||
*/
|
||||
export interface ModuleResourceArgs {
|
||||
thing?: pulumi.Input<inputs.TopLevelArgs>;
|
||||
thing?: pulumi.Input<inputs.TopLevelArgs | undefined>;
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ import * as pulumi from "@pulumi/pulumi";
|
|||
import { input as inputs, output as outputs } from "../types";
|
||||
|
||||
export interface TopLevelArgs {
|
||||
buzz?: pulumi.Input<string>;
|
||||
buzz?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ export interface NurseryArgs {
|
|||
/**
|
||||
* The sizes of trees available
|
||||
*/
|
||||
sizes?: pulumi.Input<{[key: string]: pulumi.Input<enums.tree.v1.TreeSize>}>;
|
||||
sizes?: pulumi.Input<{[key: string]: pulumi.Input<enums.tree.v1.TreeSize>} | undefined>;
|
||||
/**
|
||||
* The varieties available
|
||||
*/
|
||||
|
|
|
@ -75,16 +75,16 @@ export class RubberTree extends pulumi.CustomResource {
|
|||
}
|
||||
|
||||
export interface RubberTreeState {
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string | undefined>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The set of arguments for constructing a RubberTree resource.
|
||||
*/
|
||||
export interface RubberTreeArgs {
|
||||
container?: pulumi.Input<inputs.ContainerArgs>;
|
||||
container?: pulumi.Input<inputs.ContainerArgs | undefined>;
|
||||
diameter: pulumi.Input<enums.tree.v1.Diameter>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||
size?: pulumi.Input<enums.tree.v1.TreeSize>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string | undefined>;
|
||||
size?: pulumi.Input<enums.tree.v1.TreeSize | undefined>;
|
||||
type: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import * as pulumi from "@pulumi/pulumi";
|
|||
import { input as inputs, output as outputs, enums } from "../types";
|
||||
|
||||
export interface ContainerArgs {
|
||||
brightness?: pulumi.Input<enums.ContainerBrightness>;
|
||||
color?: pulumi.Input<enums.ContainerColor | string>;
|
||||
material?: pulumi.Input<string>;
|
||||
brightness?: pulumi.Input<enums.ContainerBrightness | undefined>;
|
||||
color?: pulumi.Input<enums.ContainerColor | string | undefined>;
|
||||
material?: pulumi.Input<string | undefined>;
|
||||
size: pulumi.Input<enums.ContainerSize>;
|
||||
}
|
||||
|
|
|
@ -33,5 +33,5 @@ export function argFunctionOutput(args?: ArgFunctionOutputArgs, opts?: pulumi.In
|
|||
}
|
||||
|
||||
export interface ArgFunctionOutputArgs {
|
||||
name?: pulumi.Input<pulumiRandom.RandomPet>;
|
||||
name?: pulumi.Input<pulumiRandom.RandomPet | undefined>;
|
||||
}
|
||||
|
|
|
@ -64,6 +64,6 @@ export class Cat extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Cat resource.
|
||||
*/
|
||||
export interface CatArgs {
|
||||
age?: pulumi.Input<number>;
|
||||
pet?: pulumi.Input<inputs.PetArgs>;
|
||||
age?: pulumi.Input<number | undefined>;
|
||||
pet?: pulumi.Input<inputs.PetArgs | undefined>;
|
||||
}
|
||||
|
|
|
@ -83,9 +83,9 @@ export class Component extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Component resource.
|
||||
*/
|
||||
export interface ComponentArgs {
|
||||
metadata?: pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>;
|
||||
metadataArray?: pulumi.Input<pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>[]>;
|
||||
metadataMap?: pulumi.Input<{[key: string]: pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>}>;
|
||||
metadata?: pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs | undefined>;
|
||||
metadataArray?: pulumi.Input<pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>[] | undefined>;
|
||||
metadataMap?: pulumi.Input<{[key: string]: pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>} | undefined>;
|
||||
requiredMetadata: pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>;
|
||||
requiredMetadataArray: pulumi.Input<pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>[]>;
|
||||
requiredMetadataMap: pulumi.Input<{[key: string]: pulumi.Input<pulumiKubernetes.types.input.meta.v1.ObjectMetaArgs>}>;
|
||||
|
|
|
@ -7,10 +7,10 @@ import { input as inputs, output as outputs } from "../types";
|
|||
import * as pulumiRandom from "@pulumi/random";
|
||||
|
||||
export interface PetArgs {
|
||||
age?: pulumi.Input<number>;
|
||||
name?: pulumi.Input<pulumiRandom.RandomPet>;
|
||||
nameArray?: pulumi.Input<pulumi.Input<pulumiRandom.RandomPet>[]>;
|
||||
nameMap?: pulumi.Input<{[key: string]: pulumi.Input<pulumiRandom.RandomPet>}>;
|
||||
age?: pulumi.Input<number | undefined>;
|
||||
name?: pulumi.Input<pulumiRandom.RandomPet | undefined>;
|
||||
nameArray?: pulumi.Input<pulumi.Input<pulumiRandom.RandomPet>[] | undefined>;
|
||||
nameMap?: pulumi.Input<{[key: string]: pulumi.Input<pulumiRandom.RandomPet>} | undefined>;
|
||||
requiredName: pulumi.Input<pulumiRandom.RandomPet>;
|
||||
requiredNameArray: pulumi.Input<pulumi.Input<pulumiRandom.RandomPet>[]>;
|
||||
requiredNameMap: pulumi.Input<{[key: string]: pulumi.Input<pulumiRandom.RandomPet>}>;
|
||||
|
|
|
@ -61,5 +61,5 @@ export class Resource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Resource resource.
|
||||
*/
|
||||
export interface ResourceArgs {
|
||||
baz?: pulumi.Input<string>;
|
||||
baz?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -61,5 +61,5 @@ export class Resource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Resource resource.
|
||||
*/
|
||||
export interface ResourceArgs {
|
||||
bar?: pulumi.Input<string>;
|
||||
bar?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -65,9 +65,9 @@ export interface ListConfigurationsOutputArgs {
|
|||
/**
|
||||
* Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details
|
||||
*/
|
||||
customerSubscriptionDetails?: pulumi.Input<inputs.CustomerSubscriptionDetailsArgs>;
|
||||
customerSubscriptionDetails?: pulumi.Input<inputs.CustomerSubscriptionDetailsArgs | undefined>;
|
||||
/**
|
||||
* $skipToken is supported on list of configurations, which provides the next page in the list of configurations.
|
||||
*/
|
||||
skipToken?: pulumi.Input<string>;
|
||||
skipToken?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -66,11 +66,11 @@ export interface ListProductFamiliesOutputArgs {
|
|||
/**
|
||||
* Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details
|
||||
*/
|
||||
customerSubscriptionDetails?: pulumi.Input<inputs.CustomerSubscriptionDetailsArgs>;
|
||||
customerSubscriptionDetails?: pulumi.Input<inputs.CustomerSubscriptionDetailsArgs | undefined>;
|
||||
/**
|
||||
* $expand is supported on configurations parameter for product, which provides details on the configurations for the product.
|
||||
*/
|
||||
expand?: pulumi.Input<string>;
|
||||
expand?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* Dictionary of filterable properties on product family.
|
||||
*/
|
||||
|
@ -78,5 +78,5 @@ export interface ListProductFamiliesOutputArgs {
|
|||
/**
|
||||
* $skipToken is supported on list of product families, which provides the next page in the list of product families.
|
||||
*/
|
||||
skipToken?: pulumi.Input<string>;
|
||||
skipToken?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ export interface ConfigurationFiltersArgs {
|
|||
/**
|
||||
* Filters specific to product
|
||||
*/
|
||||
filterableProperty?: pulumi.Input<pulumi.Input<inputs.FilterablePropertyArgs>[]>;
|
||||
filterableProperty?: pulumi.Input<pulumi.Input<inputs.FilterablePropertyArgs>[] | undefined>;
|
||||
/**
|
||||
* Product hierarchy information
|
||||
*/
|
||||
|
@ -57,7 +57,7 @@ export interface CustomerSubscriptionDetailsArgs {
|
|||
/**
|
||||
* Location placement Id of a subscription
|
||||
*/
|
||||
locationPlacementId?: pulumi.Input<string>;
|
||||
locationPlacementId?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* Quota ID of a subscription
|
||||
*/
|
||||
|
@ -65,7 +65,7 @@ export interface CustomerSubscriptionDetailsArgs {
|
|||
/**
|
||||
* List of registered feature flags for subscription
|
||||
*/
|
||||
registeredFeatures?: pulumi.Input<pulumi.Input<inputs.CustomerSubscriptionRegisteredFeaturesArgs>[]>;
|
||||
registeredFeatures?: pulumi.Input<pulumi.Input<inputs.CustomerSubscriptionRegisteredFeaturesArgs>[] | undefined>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -89,11 +89,11 @@ export interface CustomerSubscriptionRegisteredFeaturesArgs {
|
|||
/**
|
||||
* Name of subscription registered feature
|
||||
*/
|
||||
name?: pulumi.Input<string>;
|
||||
name?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* State of subscription registered feature
|
||||
*/
|
||||
state?: pulumi.Input<string>;
|
||||
state?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -153,18 +153,18 @@ export interface HierarchyInformationArgs {
|
|||
/**
|
||||
* Represents configuration name that uniquely identifies configuration
|
||||
*/
|
||||
configurationName?: pulumi.Input<string>;
|
||||
configurationName?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* Represents product family name that uniquely identifies product family
|
||||
*/
|
||||
productFamilyName?: pulumi.Input<string>;
|
||||
productFamilyName?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* Represents product line name that uniquely identifies product line
|
||||
*/
|
||||
productLineName?: pulumi.Input<string>;
|
||||
productLineName?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* Represents product name that uniquely identifies product
|
||||
*/
|
||||
productName?: pulumi.Input<string>;
|
||||
productName?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,13 +88,13 @@ export interface GetAmiIdsOutputArgs {
|
|||
* Limit search to users with *explicit* launch
|
||||
* permission on the image. Valid items are the numeric account ID or `self`.
|
||||
*/
|
||||
executableUsers?: pulumi.Input<pulumi.Input<string>[]>;
|
||||
executableUsers?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
||||
/**
|
||||
* One or more name/value pairs to filter off of. There
|
||||
* are several valid keys, for a full reference, check out
|
||||
* [describe-images in the AWS CLI reference][1].
|
||||
*/
|
||||
filters?: pulumi.Input<pulumi.Input<inputs.GetAmiIdsFilterArgs>[]>;
|
||||
filters?: pulumi.Input<pulumi.Input<inputs.GetAmiIdsFilterArgs>[] | undefined>;
|
||||
/**
|
||||
* A regex string to apply to the AMI list returned
|
||||
* by AWS. This allows more advanced filtering not supported from the AWS API.
|
||||
|
@ -102,7 +102,7 @@ export interface GetAmiIdsOutputArgs {
|
|||
* impact if the result is large. It is recommended to combine this with other
|
||||
* options to narrow down the list AWS returns.
|
||||
*/
|
||||
nameRegex?: pulumi.Input<string>;
|
||||
nameRegex?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* List of AMI owners to limit search. At least 1 value must be specified. Valid values: an AWS account ID, `self` (the current account), or an AWS owner alias (e.g. `amazon`, `aws-marketplace`, `microsoft`).
|
||||
*/
|
||||
|
@ -110,5 +110,5 @@ export interface GetAmiIdsOutputArgs {
|
|||
/**
|
||||
* Used to sort AMIs by creation time.
|
||||
*/
|
||||
sortAscending?: pulumi.Input<boolean>;
|
||||
sortAscending?: pulumi.Input<boolean | undefined>;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ export interface ListStorageAccountKeysOutputArgs {
|
|||
/**
|
||||
* Specifies type of the key to be listed. Possible value is kerb.
|
||||
*/
|
||||
expand?: pulumi.Input<string>;
|
||||
expand?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* The name of the resource group within the user's subscription. The name is case insensitive.
|
||||
*/
|
||||
|
|
|
@ -45,9 +45,9 @@ export interface FuncWithAllOptionalInputsOutputArgs {
|
|||
/**
|
||||
* Property A
|
||||
*/
|
||||
a?: pulumi.Input<string>;
|
||||
a?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* Property B
|
||||
*/
|
||||
b?: pulumi.Input<string>;
|
||||
b?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -36,5 +36,5 @@ export function funcWithDefaultValueOutput(args: FuncWithDefaultValueOutputArgs,
|
|||
|
||||
export interface FuncWithDefaultValueOutputArgs {
|
||||
a: pulumi.Input<string>;
|
||||
b?: pulumi.Input<string>;
|
||||
b?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,6 @@ export function funcWithDictParamOutput(args?: FuncWithDictParamOutputArgs, opts
|
|||
}
|
||||
|
||||
export interface FuncWithDictParamOutputArgs {
|
||||
a?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
|
||||
b?: pulumi.Input<string>;
|
||||
a?: pulumi.Input<{[key: string]: pulumi.Input<string>} | undefined>;
|
||||
b?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,6 @@ export function funcWithListParamOutput(args?: FuncWithListParamOutputArgs, opts
|
|||
}
|
||||
|
||||
export interface FuncWithListParamOutputArgs {
|
||||
a?: pulumi.Input<pulumi.Input<string>[]>;
|
||||
b?: pulumi.Input<string>;
|
||||
a?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
||||
b?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -65,5 +65,5 @@ export interface GetBastionShareableLinkOutputArgs {
|
|||
/**
|
||||
* List of VM references.
|
||||
*/
|
||||
vms?: pulumi.Input<pulumi.Input<inputs.BastionShareableLinkArgs>[]>;
|
||||
vms?: pulumi.Input<pulumi.Input<inputs.BastionShareableLinkArgs>[] | undefined>;
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ export interface GetIntegrationRuntimeObjectMetadatumOutputArgs {
|
|||
/**
|
||||
* Metadata path.
|
||||
*/
|
||||
metadataPath?: pulumi.Input<string>;
|
||||
metadataPath?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* The resource group name.
|
||||
*/
|
||||
|
|
|
@ -61,7 +61,7 @@ export interface ListStorageAccountKeysOutputArgs {
|
|||
/**
|
||||
* Specifies type of the key to be listed. Possible value is kerb.
|
||||
*/
|
||||
expand?: pulumi.Input<string>;
|
||||
expand?: pulumi.Input<string | undefined>;
|
||||
/**
|
||||
* The name of the resource group within the user's subscription. The name is case insensitive.
|
||||
*/
|
||||
|
|
|
@ -98,11 +98,11 @@ export class ModuleResource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a ModuleResource resource.
|
||||
*/
|
||||
export interface ModuleResourceArgs {
|
||||
optional_bool?: pulumi.Input<boolean>;
|
||||
optional_const?: pulumi.Input<"val">;
|
||||
optional_enum?: pulumi.Input<enums.EnumThing>;
|
||||
optional_number?: pulumi.Input<number>;
|
||||
optional_string?: pulumi.Input<string>;
|
||||
optional_bool?: pulumi.Input<boolean | undefined>;
|
||||
optional_const?: pulumi.Input<"val" | undefined>;
|
||||
optional_enum?: pulumi.Input<enums.EnumThing | undefined>;
|
||||
optional_number?: pulumi.Input<number | undefined>;
|
||||
optional_string?: pulumi.Input<string | undefined>;
|
||||
plain_optional_bool?: boolean;
|
||||
plain_optional_const?: "val";
|
||||
plain_optional_number?: number;
|
||||
|
|
|
@ -5,5 +5,5 @@ import * as pulumi from "@pulumi/pulumi";
|
|||
import { input as inputs, output as outputs } from "../types";
|
||||
|
||||
export interface FooArgs {
|
||||
a?: pulumi.Input<boolean>;
|
||||
a?: pulumi.Input<boolean | undefined>;
|
||||
}
|
||||
|
|
|
@ -48,5 +48,5 @@ export interface ProviderArgs {
|
|||
/**
|
||||
* this is a relaxed string enum which can also be set via env var
|
||||
*/
|
||||
favoriteColor?: pulumi.Input<string | enums.Color>;
|
||||
favoriteColor?: pulumi.Input<string | enums.Color | undefined>;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,6 @@ export class Person extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Person resource.
|
||||
*/
|
||||
export interface PersonArgs {
|
||||
name?: pulumi.Input<string>;
|
||||
pets?: pulumi.Input<pulumi.Input<inputs.PetArgs>[]>;
|
||||
name?: pulumi.Input<string | undefined>;
|
||||
pets?: pulumi.Input<pulumi.Input<inputs.PetArgs>[] | undefined>;
|
||||
}
|
||||
|
|
|
@ -59,5 +59,5 @@ export class Pet extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Pet resource.
|
||||
*/
|
||||
export interface PetArgs {
|
||||
name?: pulumi.Input<string>;
|
||||
name?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ import * as pulumi from "@pulumi/pulumi";
|
|||
import { input as inputs, output as outputs } from "../types";
|
||||
|
||||
export interface PetArgs {
|
||||
name?: pulumi.Input<string>;
|
||||
name?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -63,6 +63,6 @@ export class Person extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Person resource.
|
||||
*/
|
||||
export interface PersonArgs {
|
||||
name?: pulumi.Input<string>;
|
||||
pets?: pulumi.Input<pulumi.Input<inputs.PetArgs>[]>;
|
||||
name?: pulumi.Input<string | undefined>;
|
||||
pets?: pulumi.Input<pulumi.Input<inputs.PetArgs>[] | undefined>;
|
||||
}
|
||||
|
|
|
@ -59,5 +59,5 @@ export class Pet extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Pet resource.
|
||||
*/
|
||||
export interface PetArgs {
|
||||
name?: pulumi.Input<string>;
|
||||
name?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -5,5 +5,5 @@ import * as pulumi from "@pulumi/pulumi";
|
|||
import { input as inputs, output as outputs } from "../types";
|
||||
|
||||
export interface PetArgs {
|
||||
name?: pulumi.Input<string>;
|
||||
name?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ export interface NurseryArgs {
|
|||
/**
|
||||
* The sizes of trees available
|
||||
*/
|
||||
sizes?: pulumi.Input<{[key: string]: pulumi.Input<enums.tree.v1.TreeSize>}>;
|
||||
sizes?: pulumi.Input<{[key: string]: pulumi.Input<enums.tree.v1.TreeSize>} | undefined>;
|
||||
/**
|
||||
* The varieties available
|
||||
*/
|
||||
|
|
|
@ -75,16 +75,16 @@ export class RubberTree extends pulumi.CustomResource {
|
|||
}
|
||||
|
||||
export interface RubberTreeState {
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string | undefined>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The set of arguments for constructing a RubberTree resource.
|
||||
*/
|
||||
export interface RubberTreeArgs {
|
||||
container?: pulumi.Input<inputs.ContainerArgs>;
|
||||
container?: pulumi.Input<inputs.ContainerArgs | undefined>;
|
||||
diameter: pulumi.Input<enums.tree.v1.Diameter>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string>;
|
||||
size?: pulumi.Input<enums.tree.v1.TreeSize>;
|
||||
farm?: pulumi.Input<enums.tree.v1.Farm | string | undefined>;
|
||||
size?: pulumi.Input<enums.tree.v1.TreeSize | undefined>;
|
||||
type: pulumi.Input<enums.tree.v1.RubberTreeVariety>;
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ import * as pulumi from "@pulumi/pulumi";
|
|||
import { input as inputs, output as outputs, enums } from "../types";
|
||||
|
||||
export interface ContainerArgs {
|
||||
brightness?: pulumi.Input<enums.ContainerBrightness>;
|
||||
color?: pulumi.Input<enums.ContainerColor | string>;
|
||||
material?: pulumi.Input<string>;
|
||||
brightness?: pulumi.Input<enums.ContainerBrightness | undefined>;
|
||||
color?: pulumi.Input<enums.ContainerColor | string | undefined>;
|
||||
material?: pulumi.Input<string | undefined>;
|
||||
size: pulumi.Input<enums.ContainerSize>;
|
||||
}
|
||||
|
|
|
@ -61,8 +61,8 @@ export namespace Foo {
|
|||
* The set of arguments for the Foo.getKubeconfig method.
|
||||
*/
|
||||
export interface GetKubeconfigArgs {
|
||||
profileName?: pulumi.Input<string>;
|
||||
roleArn?: pulumi.Input<string>;
|
||||
profileName?: pulumi.Input<string | undefined>;
|
||||
roleArn?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -91,16 +91,16 @@ export namespace Foo {
|
|||
* The set of arguments for the Foo.bar method.
|
||||
*/
|
||||
export interface BarArgs {
|
||||
baz?: pulumi.Input<inputs.nested.BazArgs>;
|
||||
baz?: pulumi.Input<inputs.nested.BazArgs | undefined>;
|
||||
bazPlain?: inputs.nested.BazArgs;
|
||||
bazRequired: pulumi.Input<inputs.nested.BazArgs>;
|
||||
boolValue?: pulumi.Input<boolean>;
|
||||
boolValue?: pulumi.Input<boolean | undefined>;
|
||||
boolValuePlain?: boolean;
|
||||
boolValueRequired: pulumi.Input<boolean>;
|
||||
name?: pulumi.Input<pulumiRandom.RandomPet>;
|
||||
name?: pulumi.Input<pulumiRandom.RandomPet | undefined>;
|
||||
namePlain?: pulumiRandom.RandomPet;
|
||||
nameRequired: pulumi.Input<pulumiRandom.RandomPet>;
|
||||
stringValue?: pulumi.Input<string>;
|
||||
stringValue?: pulumi.Input<string | undefined>;
|
||||
stringValuePlain?: string;
|
||||
stringValueRequired: pulumi.Input<string>;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ export namespace nested {
|
|||
}
|
||||
|
||||
export interface BazArgs {
|
||||
hello?: pulumi.Input<string>;
|
||||
world?: pulumi.Input<string>;
|
||||
hello?: pulumi.Input<string | undefined>;
|
||||
world?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,5 +89,5 @@ export interface ComponentArgs {
|
|||
d?: number;
|
||||
e: string;
|
||||
f?: string;
|
||||
foo?: pulumi.Input<inputs.FooArgs>;
|
||||
foo?: pulumi.Input<inputs.FooArgs | undefined>;
|
||||
}
|
||||
|
|
|
@ -91,5 +91,5 @@ export interface ComponentArgs {
|
|||
d?: number;
|
||||
e: string;
|
||||
f?: string;
|
||||
foo?: pulumi.Input<inputs.FooArgs>;
|
||||
foo?: pulumi.Input<inputs.FooArgs | undefined>;
|
||||
}
|
||||
|
|
|
@ -33,5 +33,5 @@ export function argFunctionOutput(args?: ArgFunctionOutputArgs, opts?: pulumi.In
|
|||
}
|
||||
|
||||
export interface ArgFunctionOutputArgs {
|
||||
arg1?: pulumi.Input<Resource>;
|
||||
arg1?: pulumi.Input<Resource | undefined>;
|
||||
}
|
||||
|
|
|
@ -49,5 +49,5 @@ export class OtherResource extends pulumi.ComponentResource {
|
|||
* The set of arguments for constructing a OtherResource resource.
|
||||
*/
|
||||
export interface OtherResourceArgs {
|
||||
foo?: pulumi.Input<Resource>;
|
||||
foo?: pulumi.Input<Resource | undefined>;
|
||||
}
|
||||
|
|
|
@ -59,5 +59,5 @@ export class Resource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Resource resource.
|
||||
*/
|
||||
export interface ResourceArgs {
|
||||
bar?: pulumi.Input<string>;
|
||||
bar?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -33,5 +33,5 @@ export function argFunctionOutput(args?: ArgFunctionOutputArgs, opts?: pulumi.In
|
|||
}
|
||||
|
||||
export interface ArgFunctionOutputArgs {
|
||||
arg1?: pulumi.Input<Resource>;
|
||||
arg1?: pulumi.Input<Resource | undefined>;
|
||||
}
|
||||
|
|
|
@ -49,5 +49,5 @@ export class OtherResource extends pulumi.ComponentResource {
|
|||
* The set of arguments for constructing a OtherResource resource.
|
||||
*/
|
||||
export interface OtherResourceArgs {
|
||||
foo?: pulumi.Input<Resource>;
|
||||
foo?: pulumi.Input<Resource | undefined>;
|
||||
}
|
||||
|
|
|
@ -61,5 +61,5 @@ export class Resource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Resource resource.
|
||||
*/
|
||||
export interface ResourceArgs {
|
||||
bar?: pulumi.Input<string>;
|
||||
bar?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ export class TypeUses extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a TypeUses resource.
|
||||
*/
|
||||
export interface TypeUsesArgs {
|
||||
bar?: pulumi.Input<inputs.SomeOtherObjectArgs>;
|
||||
baz?: pulumi.Input<inputs.ObjectWithNodeOptionalInputsArgs>;
|
||||
foo?: pulumi.Input<inputs.ObjectArgs>;
|
||||
bar?: pulumi.Input<inputs.SomeOtherObjectArgs | undefined>;
|
||||
baz?: pulumi.Input<inputs.ObjectWithNodeOptionalInputsArgs | undefined>;
|
||||
foo?: pulumi.Input<inputs.ObjectArgs | undefined>;
|
||||
}
|
||||
|
|
|
@ -7,28 +7,28 @@ import { input as inputs, output as outputs } from "../types";
|
|||
import {Resource} from "..";
|
||||
|
||||
export interface ConfigMapArgs {
|
||||
config?: pulumi.Input<string>;
|
||||
config?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
||||
export interface ObjectArgs {
|
||||
bar?: pulumi.Input<string>;
|
||||
configs?: pulumi.Input<pulumi.Input<inputs.ConfigMapArgs>[]>;
|
||||
foo?: pulumi.Input<Resource>;
|
||||
bar?: pulumi.Input<string | undefined>;
|
||||
configs?: pulumi.Input<pulumi.Input<inputs.ConfigMapArgs>[] | undefined>;
|
||||
foo?: pulumi.Input<Resource | undefined>;
|
||||
/**
|
||||
* List of lists of other objects
|
||||
*/
|
||||
others?: pulumi.Input<pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>[]>;
|
||||
others?: pulumi.Input<pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>[] | undefined>;
|
||||
/**
|
||||
* Mapping from string to list of some other object
|
||||
*/
|
||||
stillOthers?: pulumi.Input<{[key: string]: pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>}>;
|
||||
stillOthers?: pulumi.Input<{[key: string]: pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>} | undefined>;
|
||||
}
|
||||
|
||||
export interface ObjectWithNodeOptionalInputsArgs {
|
||||
bar?: pulumi.Input<number>;
|
||||
foo?: pulumi.Input<string>;
|
||||
bar?: pulumi.Input<number | undefined>;
|
||||
foo?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
||||
export interface SomeOtherObjectArgs {
|
||||
baz?: pulumi.Input<string>;
|
||||
baz?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -33,5 +33,5 @@ export function argFunctionOutput(args?: ArgFunctionOutputArgs, opts?: pulumi.In
|
|||
}
|
||||
|
||||
export interface ArgFunctionOutputArgs {
|
||||
arg1?: pulumi.Input<Resource>;
|
||||
arg1?: pulumi.Input<Resource | undefined>;
|
||||
}
|
||||
|
|
|
@ -51,5 +51,5 @@ export class OtherResource extends pulumi.ComponentResource {
|
|||
*/
|
||||
export interface OtherResourceArgs {
|
||||
bar?: pulumi.Input<string>[];
|
||||
foo?: pulumi.Input<Resource>;
|
||||
foo?: pulumi.Input<Resource | undefined>;
|
||||
}
|
||||
|
|
|
@ -61,5 +61,5 @@ export class Resource extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a Resource resource.
|
||||
*/
|
||||
export interface ResourceArgs {
|
||||
bar?: pulumi.Input<string>;
|
||||
bar?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -71,8 +71,8 @@ export class TypeUses extends pulumi.CustomResource {
|
|||
* The set of arguments for constructing a TypeUses resource.
|
||||
*/
|
||||
export interface TypeUsesArgs {
|
||||
bar?: pulumi.Input<inputs.SomeOtherObjectArgs>;
|
||||
baz?: pulumi.Input<inputs.ObjectWithNodeOptionalInputsArgs>;
|
||||
foo?: pulumi.Input<inputs.ObjectArgs>;
|
||||
qux?: pulumi.Input<enums.RubberTreeVariety>;
|
||||
bar?: pulumi.Input<inputs.SomeOtherObjectArgs | undefined>;
|
||||
baz?: pulumi.Input<inputs.ObjectWithNodeOptionalInputsArgs | undefined>;
|
||||
foo?: pulumi.Input<inputs.ObjectArgs | undefined>;
|
||||
qux?: pulumi.Input<enums.RubberTreeVariety | undefined>;
|
||||
}
|
||||
|
|
|
@ -7,28 +7,28 @@ import { input as inputs, output as outputs, enums } from "../types";
|
|||
import {Resource} from "..";
|
||||
|
||||
export interface ConfigMapArgs {
|
||||
config?: pulumi.Input<string>;
|
||||
config?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
||||
export interface ObjectArgs {
|
||||
bar?: pulumi.Input<string>;
|
||||
configs?: pulumi.Input<pulumi.Input<inputs.ConfigMapArgs>[]>;
|
||||
foo?: pulumi.Input<Resource>;
|
||||
bar?: pulumi.Input<string | undefined>;
|
||||
configs?: pulumi.Input<pulumi.Input<inputs.ConfigMapArgs>[] | undefined>;
|
||||
foo?: pulumi.Input<Resource | undefined>;
|
||||
/**
|
||||
* List of lists of other objects
|
||||
*/
|
||||
others?: pulumi.Input<pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>[]>;
|
||||
others?: pulumi.Input<pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>[] | undefined>;
|
||||
/**
|
||||
* Mapping from string to list of some other object
|
||||
*/
|
||||
stillOthers?: pulumi.Input<{[key: string]: pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>}>;
|
||||
stillOthers?: pulumi.Input<{[key: string]: pulumi.Input<pulumi.Input<inputs.SomeOtherObjectArgs>[]>} | undefined>;
|
||||
}
|
||||
|
||||
export interface ObjectWithNodeOptionalInputsArgs {
|
||||
bar?: pulumi.Input<number>;
|
||||
foo?: pulumi.Input<string>;
|
||||
bar?: pulumi.Input<number | undefined>;
|
||||
foo?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
||||
export interface SomeOtherObjectArgs {
|
||||
baz?: pulumi.Input<string>;
|
||||
baz?: pulumi.Input<string | undefined>;
|
||||
}
|
||||
|
|
|
@ -68,6 +68,14 @@ func Union(t ...TypeAst) TypeAst {
|
|||
return &unionType{t[0], t[1], t[2:]}
|
||||
}
|
||||
|
||||
// IsUnion returns true if the AST node is a union.
|
||||
func IsUnion(t TypeAst) ([]TypeAst, bool) {
|
||||
if union, ok := t.(*unionType); ok {
|
||||
return union.all(), true
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// Normalizes by unnesting unions `A | (B | C) => A | B | C`.
|
||||
func Normalize(ast TypeAst) TypeAst {
|
||||
return transform(ast, func(t TypeAst) TypeAst {
|
||||
|
|
|
@ -432,13 +432,15 @@ func (mod *modContext) genPlainType(w io.Writer, name, comment string, propertie
|
|||
prefix = "readonly "
|
||||
}
|
||||
|
||||
sigil, propertyType := "", p.Type
|
||||
if !p.IsRequired() {
|
||||
sigil, propertyType = "?", codegen.RequiredType(p)
|
||||
sigil, typ := "", mod.typeAst(p.Type, input, p.ConstValue)
|
||||
if types, ok := tstypes.IsUnion(typ); ok {
|
||||
if id, ok := tstypes.IsIdentifier(types[len(types)-1]); ok && id == "undefined" {
|
||||
sigil, typ = "?", tstypes.Union(types[:len(types)-1]...)
|
||||
}
|
||||
}
|
||||
|
||||
typ := mod.typeString(propertyType, input, p.ConstValue)
|
||||
fmt.Fprintf(w, "%s %s%s%s: %s;\n", indent, prefix, p.Name, sigil, typ)
|
||||
typLit := tstypes.TypeLiteral(tstypes.Normalize(typ))
|
||||
fmt.Fprintf(w, "%s %s%s%s: %s;\n", indent, prefix, p.Name, sigil, typLit)
|
||||
}
|
||||
fmt.Fprintf(w, "%s}\n", indent)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue