UNPKG

@ao-tools/pulumi-ao

Version:

A Pulumi provider for AO processes

35 lines 1.56 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Process = void 0; const Pulumi = require("@pulumi/pulumi"); const Constants = require("../constants"); const provider_1 = require("./provider"); /** * Represents a process on AO * Executes Lua code on spawn and sets global Environment variables. */ class Process extends Pulumi.dynamic.Resource { constructor(name, inputProps, options) { inputProps.name = inputProps.name ?? name; inputProps.moduleId = inputProps.moduleId ?? Constants.AOS_2_0_1_CODE_ID; inputProps.authorityId = inputProps.authorityId ?? Constants.TESTNET_AUTHORITY_ID; inputProps.customTags = inputProps.customTags ?? {}; inputProps.environment = inputProps.environment ?? {}; const config = new Pulumi.Config("ao"); inputProps.schedulerId = config.get("schedulerId") ?? Constants.DEFAULT_SCHEDULER_ID; inputProps.gatewayUrl = inputProps.gatewayUrl ?? config.get("gatewayUrl") ?? Constants.DEFAULT_GATEWAY_URL; inputProps.walletPath = inputProps.walletPath ?? config.require("walletPath"); // props generated by the provider, can't be directly changed by the user const outputProps = { owner: "", tags: {} }; const allProps = { ...inputProps, ...outputProps }; super(new provider_1.ProcessProvider(), name, allProps, options, "ao", "Process"); } } exports.Process = Process; //# sourceMappingURL=index.js.map