Skip to content

Commit

Permalink
chore: rename remaining vars NITRO to HEXA
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko committed Oct 20, 2019
1 parent 49db4ba commit 3320996
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = async function(options?: NitroInitOptions) {
Config.set("project", name);
const subscriptions: AzureSubscription[] = Config.get("subscriptions");

if (!subscriptions || (subscriptions && subscriptions.length === 0) || process.env.NITRO_FORCE_LOGIN) {
if (!subscriptions || (subscriptions && subscriptions.length === 0) || process.env.HEXA_FORCE_LOGIN) {
await require(`./login`)();
} else {
debug(`found previous subscriptions ${JSON.stringify(subscriptions)}`);
Expand Down
4 changes: 2 additions & 2 deletions src/core/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function chooseResourceGroup(resourceGroups: AzureResourceGroup[]): Promi
// move resource groups created with Hexa to the top
resourceGroups = resourceGroups.sort((a, b) => (a.tags && a.tags["x-created-by"] === "hexa" ? -1 : 1));

if (process.env.NITRO_ENABLE_ADDING_NEW_RESOURCE) {
if (process.env.HEXA_ENABLE_ADDING_NEW_RESOURCE) {
resourceGroups = [
...resourceGroups,
{
Expand Down Expand Up @@ -70,7 +70,7 @@ export function chooseAccountStorage(storageAccounts: AzureStorage[]): Promise<i
// move storage accounts created with Hexa to the top
storageAccounts = storageAccounts.sort((a, b) => (a.tags && a.tags["x-created-by"] === "hexa" ? -1 : 1));

if (process.env.NITRO_ENABLE_ADDING_NEW_RESOURCE) {
if (process.env.HEXA_ENABLE_ADDING_NEW_RESOURCE) {
storageAccounts = [
...storageAccounts,
{
Expand Down
2 changes: 1 addition & 1 deletion src/features/storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ module.exports = async function() {
storage
});

if (process.env.NITRO_STORAGE_GENERATE_TOKEN) {
if (process.env.HEXA_STORAGE_GENERATE_TOKEN) {
return (await require("./tokens"))();
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion src/features/storage/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = async function() {
const subscription: AzureSubscription = Config.get("subscription");
debug(`using subscription ${chalk.green(subscription.name)}`);

if (process.env.NITRO_STORAGE_USE_SAS) {
if (process.env.HEXA_STORAGE_USE_SAS) {
// https://docs.microsoft.com/en-us/cli/azure/storage/account?view=azure-cli-latest#az-storage-account-generate-sas
const expiryYear = new Date().getFullYear() + 2;
let sas = await az<string>(
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ console.log(prettyFont.string);
process.env.HEXA_AUTO_MODE = "1";
}
if (program.create) {
process.env.NITRO_ENABLE_ADDING_NEW_RESOURCE = "1";
process.env.HEXA_ENABLE_ADDING_NEW_RESOURCE = "1";
}
if (program.relogin) {
process.env.NITRO_FORCE_LOGIN = "1";
process.env.HEXA_FORCE_LOGIN = "1";
}
if (program.sas) {
process.env.NITRO_STORAGE_USE_SAS = "1";
process.env.HEXA_STORAGE_USE_SAS = "1";
program.token = true;
}
if (program.token) {
process.env.NITRO_STORAGE_GENERATE_TOKEN = "1";
process.env.HEXA_STORAGE_GENERATE_TOKEN = "1";
}

// use process.argv not program.argv
Expand Down
6 changes: 3 additions & 3 deletions src/type.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ declare interface ProcessEnv {
DEBUG: string;
HEXA_AUTO_MODE: "1";
HEXA_FORCE_MODE: "1";
NITRO_ENABLE_ADDING_NEW_RESOURCE: "1";
NITRO_FORCE_LOGIN: "1";
NITRO_STORAGE_USE_SAS: "1";
HEXA_ENABLE_ADDING_NEW_RESOURCE: "1";
HEXA_FORCE_LOGIN: "1";
HEXA_STORAGE_USE_SAS: "1";
HEXA_YOLO_MODE: "1";
}

Expand Down

0 comments on commit 3320996

Please sign in to comment.