diff --git a/sdk/nodejs/image.ts b/sdk/nodejs/image.ts index ba1dd97..9bd2906 100644 --- a/sdk/nodejs/image.ts +++ b/sdk/nodejs/image.ts @@ -501,7 +501,7 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--add-host` flag. */ - public readonly addHosts!: pulumi.Output; + declare public readonly addHosts: pulumi.Output; /** * `ARG` names and values to set during the build. * @@ -513,7 +513,7 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--build-arg` flag. */ - public readonly buildArgs!: pulumi.Output<{[key: string]: string} | undefined>; + declare public readonly buildArgs: pulumi.Output<{[key: string]: string} | undefined>; /** * Setting this to `false` will always skip image builds during previews, * and setting it to `true` will always build images during previews. @@ -527,35 +527,35 @@ export class Image extends pulumi.CustomResource { * Defaults to `true` as a safeguard against broken images merging as part * of CI pipelines. */ - public readonly buildOnPreview!: pulumi.Output; + declare public readonly buildOnPreview: pulumi.Output; /** * Builder configuration. */ - public readonly builder!: pulumi.Output; + declare public readonly builder: pulumi.Output; /** * Cache export configuration. * * Equivalent to Docker's `--cache-from` flag. */ - public readonly cacheFrom!: pulumi.Output; + declare public readonly cacheFrom: pulumi.Output; /** * Cache import configuration. * * Equivalent to Docker's `--cache-to` flag. */ - public readonly cacheTo!: pulumi.Output; + declare public readonly cacheTo: pulumi.Output; /** * Build context settings. Defaults to the current directory. * * Equivalent to Docker's `PATH | URL | -` positional argument. */ - public readonly context!: pulumi.Output; + declare public readonly context: pulumi.Output; /** * A preliminary hash of the image's build context. * * Pulumi uses this to determine if an image _may_ need to be re-built. */ - public /*out*/ readonly contextHash!: pulumi.Output; + declare public /*out*/ readonly contextHash: pulumi.Output; /** * A SHA256 digest of the image if it was exported to a registry or * elsewhere. @@ -565,13 +565,13 @@ export class Image extends pulumi.CustomResource { * Registry images can be referenced precisely as `@`. The * `ref` output provides one such reference as a convenience. */ - public /*out*/ readonly digest!: pulumi.Output; + declare public /*out*/ readonly digest: pulumi.Output; /** * Dockerfile settings. * * Equivalent to Docker's `--file` flag. */ - public readonly dockerfile!: pulumi.Output; + declare public readonly dockerfile: pulumi.Output; /** * Use `exec` mode to build this image. * @@ -594,7 +594,7 @@ export class Image extends pulumi.CustomResource { * are temporarily written to disk in order to provide them to the * `docker-buildx` binary. */ - public readonly exec!: pulumi.Output; + declare public readonly exec: pulumi.Output; /** * Controls where images are persisted after building. * @@ -606,13 +606,13 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--output` flag. */ - public readonly exports!: pulumi.Output; + declare public readonly exports: pulumi.Output; /** * Attach arbitrary key/value metadata to the image. * * Equivalent to Docker's `--label` flag. */ - public readonly labels!: pulumi.Output<{[key: string]: string} | undefined>; + declare public readonly labels: pulumi.Output<{[key: string]: string} | undefined>; /** * When `true` the build will automatically include a `docker` export. * @@ -620,7 +620,7 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--load` flag. */ - public readonly load!: pulumi.Output; + declare public readonly load: pulumi.Output; /** * Set the network mode for `RUN` instructions. Defaults to `default`. * @@ -628,25 +628,25 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--network` flag. */ - public readonly network!: pulumi.Output; + declare public readonly network: pulumi.Output; /** * Do not import cache manifests when building the image. * * Equivalent to Docker's `--no-cache` flag. */ - public readonly noCache!: pulumi.Output; + declare public readonly noCache: pulumi.Output; /** * Set target platform(s) for the build. Defaults to the host's platform. * * Equivalent to Docker's `--platform` flag. */ - public readonly platforms!: pulumi.Output; + declare public readonly platforms: pulumi.Output; /** * Always pull referenced images. * * Equivalent to Docker's `--pull` flag. */ - public readonly pull!: pulumi.Output; + declare public readonly pull: pulumi.Output; /** * When `true` the build will automatically include a `registry` export. * @@ -654,7 +654,7 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--push` flag. */ - public readonly push!: pulumi.Output; + declare public readonly push: pulumi.Output; /** * If the image was pushed to any registries then this will contain a * single fully-qualified tag including the build's digest. @@ -671,7 +671,7 @@ export class Image extends pulumi.CustomResource { * For more control over tags consumed by downstream resources you should * use the `digest` output. */ - public /*out*/ readonly ref!: pulumi.Output; + declare public /*out*/ readonly ref: pulumi.Output; /** * Registry credentials. Required if reading or exporting to private * repositories. @@ -681,7 +681,7 @@ export class Image extends pulumi.CustomResource { * * Similar to `docker login`. */ - public readonly registries!: pulumi.Output; + declare public readonly registries: pulumi.Output; /** * A mapping of secret names to their corresponding values. * @@ -693,13 +693,13 @@ export class Image extends pulumi.CustomResource { * * Similar to Docker's `--secret` flag. */ - public readonly secrets!: pulumi.Output<{[key: string]: string} | undefined>; + declare public readonly secrets: pulumi.Output<{[key: string]: string} | undefined>; /** * SSH agent socket or keys to expose to the build. * * Equivalent to Docker's `--ssh` flag. */ - public readonly ssh!: pulumi.Output; + declare public readonly ssh: pulumi.Output; /** * Name and optionally a tag (format: `name:tag`). * @@ -708,7 +708,7 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--tag` flag. */ - public readonly tags!: pulumi.Output; + declare public readonly tags: pulumi.Output; /** * Set the target build stage(s) to build. * @@ -716,7 +716,7 @@ export class Image extends pulumi.CustomResource { * * Equivalent to Docker's `--target` flag. */ - public readonly target!: pulumi.Output; + declare public readonly target: pulumi.Output; /** * Create a Image resource with the given unique name, arguments, and options. @@ -729,31 +729,31 @@ export class Image extends pulumi.CustomResource { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (!opts.id) { - if ((!args || args.push === undefined) && !opts.urn) { + if (args?.push === undefined && !opts.urn) { throw new Error("Missing required property 'push'"); } - resourceInputs["addHosts"] = args ? args.addHosts : undefined; - resourceInputs["buildArgs"] = args ? args.buildArgs : undefined; - resourceInputs["buildOnPreview"] = (args ? args.buildOnPreview : undefined) ?? true; - resourceInputs["builder"] = args ? args.builder : undefined; - resourceInputs["cacheFrom"] = args ? args.cacheFrom : undefined; - resourceInputs["cacheTo"] = args ? args.cacheTo : undefined; - resourceInputs["context"] = args ? args.context : undefined; - resourceInputs["dockerfile"] = args ? args.dockerfile : undefined; - resourceInputs["exec"] = args ? args.exec : undefined; - resourceInputs["exports"] = args ? args.exports : undefined; - resourceInputs["labels"] = args ? args.labels : undefined; - resourceInputs["load"] = args ? args.load : undefined; - resourceInputs["network"] = (args ? args.network : undefined) ?? "default"; - resourceInputs["noCache"] = args ? args.noCache : undefined; - resourceInputs["platforms"] = args ? args.platforms : undefined; - resourceInputs["pull"] = args ? args.pull : undefined; - resourceInputs["push"] = args ? args.push : undefined; - resourceInputs["registries"] = args ? args.registries : undefined; - resourceInputs["secrets"] = args ? args.secrets : undefined; - resourceInputs["ssh"] = args ? args.ssh : undefined; - resourceInputs["tags"] = args ? args.tags : undefined; - resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["addHosts"] = args?.addHosts; + resourceInputs["buildArgs"] = args?.buildArgs; + resourceInputs["buildOnPreview"] = (args?.buildOnPreview) ?? true; + resourceInputs["builder"] = args?.builder; + resourceInputs["cacheFrom"] = args?.cacheFrom; + resourceInputs["cacheTo"] = args?.cacheTo; + resourceInputs["context"] = args?.context; + resourceInputs["dockerfile"] = args?.dockerfile; + resourceInputs["exec"] = args?.exec; + resourceInputs["exports"] = args?.exports; + resourceInputs["labels"] = args?.labels; + resourceInputs["load"] = args?.load; + resourceInputs["network"] = (args?.network) ?? "default"; + resourceInputs["noCache"] = args?.noCache; + resourceInputs["platforms"] = args?.platforms; + resourceInputs["pull"] = args?.pull; + resourceInputs["push"] = args?.push; + resourceInputs["registries"] = args?.registries; + resourceInputs["secrets"] = args?.secrets; + resourceInputs["ssh"] = args?.ssh; + resourceInputs["tags"] = args?.tags; + resourceInputs["target"] = args?.target; resourceInputs["contextHash"] = undefined /*out*/; resourceInputs["digest"] = undefined /*out*/; resourceInputs["ref"] = undefined /*out*/; diff --git a/sdk/nodejs/index_.ts b/sdk/nodejs/index_.ts index e2986c6..c21966b 100644 --- a/sdk/nodejs/index_.ts +++ b/sdk/nodejs/index_.ts @@ -113,27 +113,27 @@ export class Index extends pulumi.CustomResource { * * Defaults to `true`. */ - public readonly push!: pulumi.Output; + declare public readonly push: pulumi.Output; /** * The pushed tag with digest. * * Identical to the tag if the index was not pushed. */ - public /*out*/ readonly ref!: pulumi.Output; + declare public /*out*/ readonly ref: pulumi.Output; /** * Authentication for the registry where the tagged index will be pushed. * * Credentials can also be included with the provider's configuration. */ - public readonly registry!: pulumi.Output; + declare public readonly registry: pulumi.Output; /** * Existing images to include in the index. */ - public readonly sources!: pulumi.Output; + declare public readonly sources: pulumi.Output; /** * The tag to apply to the index. */ - public readonly tag!: pulumi.Output; + declare public readonly tag: pulumi.Output; /** * Create a Index resource with the given unique name, arguments, and options. @@ -146,16 +146,16 @@ export class Index extends pulumi.CustomResource { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (!opts.id) { - if ((!args || args.sources === undefined) && !opts.urn) { + if (args?.sources === undefined && !opts.urn) { throw new Error("Missing required property 'sources'"); } - if ((!args || args.tag === undefined) && !opts.urn) { + if (args?.tag === undefined && !opts.urn) { throw new Error("Missing required property 'tag'"); } - resourceInputs["push"] = (args ? args.push : undefined) ?? true; - resourceInputs["registry"] = args ? args.registry : undefined; - resourceInputs["sources"] = args ? args.sources : undefined; - resourceInputs["tag"] = args ? args.tag : undefined; + resourceInputs["push"] = (args?.push) ?? true; + resourceInputs["registry"] = args?.registry; + resourceInputs["sources"] = args?.sources; + resourceInputs["tag"] = args?.tag; resourceInputs["ref"] = undefined /*out*/; } else { resourceInputs["push"] = undefined /*out*/; diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index a2ed3e7..06f043e 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -25,7 +25,7 @@ export class Provider extends pulumi.ProviderResource { /** * The build daemon's address. */ - public readonly host!: pulumi.Output; + declare public readonly host: pulumi.Output; /** * Create a Provider resource with the given unique name, arguments, and options. @@ -38,8 +38,8 @@ export class Provider extends pulumi.ProviderResource { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; { - resourceInputs["host"] = (args ? args.host : undefined) ?? (utilities.getEnv("DOCKER_HOST") || ""); - resourceInputs["registries"] = pulumi.output(args ? args.registries : undefined).apply(JSON.stringify); + resourceInputs["host"] = (args?.host) ?? (utilities.getEnv("DOCKER_HOST") || ""); + resourceInputs["registries"] = pulumi.output(args?.registries).apply(JSON.stringify); } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Provider.__pulumiType, name, resourceInputs, opts); diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 276795b..903b1ff 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "outDir": "bin", - "target": "es2016", + "target": "ES2020", "module": "commonjs", "moduleResolution": "node", "declaration": true,