2017-10-19 17:26:57 +02:00
|
|
|
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
|
|
|
|
|
|
|
|
// This file exports metadata about the context in which a program is being run.
|
|
|
|
|
|
|
|
import * as runtime from "./runtime";
|
|
|
|
|
|
|
|
/**
|
2017-11-09 01:20:27 +01:00
|
|
|
* getProject returns the current project name, or the empty string if there is none.
|
2017-10-19 17:26:57 +02:00
|
|
|
*/
|
|
|
|
export function getProject(): string {
|
2017-11-21 02:38:09 +01:00
|
|
|
return runtime.options.project || "project";
|
2017-10-19 17:26:57 +02:00
|
|
|
}
|
|
|
|
/**
|
|
|
|
* getStack returns the current stack name, or the empty string if there is none.
|
|
|
|
*/
|
|
|
|
export function getStack(): string {
|
2017-11-21 02:38:09 +01:00
|
|
|
return runtime.options.stack || "stack";
|
2017-10-19 17:26:57 +02:00
|
|
|
}
|