Skip to content

Commit

Permalink
feat: new property for replacements to allow unset envs (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc authored Jun 27, 2023
1 parent e0b9155 commit 886aa05
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
12 changes: 12 additions & 0 deletions sfdx-project.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@
"replaceWithEnv": {
"type": "string"
},
"allowUnsetEnvVariable": {
"type": "boolean"
},
"stringToReplace": {
"type": "string"
},
Expand Down Expand Up @@ -326,6 +329,9 @@
"replaceWithEnv": {
"type": "string"
},
"allowUnsetEnvVariable": {
"type": "boolean"
},
"regexToReplace": {
"type": "string"
},
Expand Down Expand Up @@ -404,6 +410,9 @@
"replaceWithEnv": {
"type": "string"
},
"allowUnsetEnvVariable": {
"type": "boolean"
},
"stringToReplace": {
"type": "string"
},
Expand Down Expand Up @@ -482,6 +491,9 @@
"replaceWithEnv": {
"type": "string"
},
"allowUnsetEnvVariable": {
"type": "boolean"
},
"regexToReplace": {
"type": "string"
},
Expand Down
6 changes: 5 additions & 1 deletion src/replacements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ type ReplaceWith =
replaceWithFile: string;
replaceWithEnv?: never;
}
| { replaceWithEnv: string; replaceWithFile?: never };
| {
replaceWithEnv: string;
replaceWithFile?: never;
allowUnsetEnvVariable?: boolean;
};

type EnvConditional = {
env: string;
Expand Down

0 comments on commit 886aa05

Please sign in to comment.