More renames

This commit is contained in:
Bryce Lampe
2024-03-07 13:51:35 -08:00
parent f294595eef
commit 3427e6115f
47 changed files with 6052 additions and 443 deletions

View File

@@ -0,0 +1 @@
Description

View File

@@ -20,18 +20,18 @@ const _module = {
version: utilities.getVersion(),
construct: (name: string, type: string, urn: string): pulumi.Resource => {
switch (type) {
case "xyz:index:Random":
case "docker-native:index:Random":
return new Random(name, <any>undefined, { urn })
default:
throw new Error(`unknown resource type ${type}`);
}
},
};
pulumi.runtime.registerResourceModule("xyz", "index", _module)
pulumi.runtime.registerResourcePackage("xyz", {
pulumi.runtime.registerResourceModule("docker-native", "index", _module)
pulumi.runtime.registerResourcePackage("docker-native", {
version: utilities.getVersion(),
constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => {
if (type !== "pulumi:providers:xyz") {
if (type !== "pulumi:providers:docker-native") {
throw new Error(`unknown provider type ${type}`);
}
return new Provider(name, <any>undefined, { urn });

View File

@@ -1,6 +1,11 @@
{
"name": "@pulumi/xyz",
"name": "@pulumi/docker-native",
"version": "${VERSION}",
"keywords": [
"keywords"
],
"homepage": "pulumi.com",
"repository": "https://github.com/pulumi/pulumi-docker-native",
"scripts": {
"build": "tsc"
},
@@ -13,6 +18,7 @@
},
"pulumi": {
"resource": true,
"name": "xyz"
"name": "docker-native",
"server": "github.com/pulumi/pulumi-docker-native"
}
}

View File

@@ -6,7 +6,7 @@ import * as utilities from "./utilities";
export class Provider extends pulumi.ProviderResource {
/** @internal */
public static readonly __pulumiType = 'xyz';
public static readonly __pulumiType = 'docker-native';
/**
* Returns true if the given object is an instance of Provider. This is designed to work even

View File

@@ -18,7 +18,7 @@ export class Random extends pulumi.CustomResource {
}
/** @internal */
public static readonly __pulumiType = 'xyz:index:Random';
public static readonly __pulumiType = 'docker-native:index:Random';
/**
* Returns true if the given object is an instance of Random. This is designed to work even

View File

@@ -2,6 +2,9 @@
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as runtime from "@pulumi/pulumi/runtime";
import * as pulumi from "@pulumi/pulumi";
export function getEnv(...vars: string[]): string | undefined {
for (const v of vars) {
const value = process.env[v];
@@ -50,7 +53,7 @@ export function getVersion(): string {
/** @internal */
export function resourceOptsDefaults(): any {
return { version: getVersion() };
return { version: getVersion(), pluginDownloadURL: "github.com/pulumi/pulumi-docker-native" };
}
/** @internal */
@@ -64,3 +67,29 @@ export function lazyLoad(exports: any, props: string[], loadModule: any) {
});
}
}
export async function callAsync<T>(
tok: string,
props: pulumi.Inputs,
res?: pulumi.Resource,
opts?: {property?: string},
): Promise<T> {
const o: any = runtime.call<T>(tok, props, res);
const value = await o.promise(true /*withUnknowns*/);
const isKnown = await o.isKnown;
const isSecret = await o.isSecret;
const problem: string|undefined =
!isKnown ? "an unknown value"
: isSecret ? "a secret value"
: undefined;
// Ingoring o.resources silently. They are typically non-empty, r.f() calls include r as a dependency.
if (problem) {
throw new Error(`Plain resource method "${tok}" incorrectly returned ${problem}. ` +
"This is an error in the provider, please report this to the provider developer.");
}
// Extract a single property if requested.
if (opts && opts.property) {
return value[opts.property];
}
return value;
}