Skip to content

Commit

Permalink
v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrywithaz committed Jan 20, 2022
1 parent 4d27c3a commit ed2906f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-datastore-emulator-ui",
"version": "1.3.0",
"version": "1.3.1",
"description": "",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/server/lib/src/decorators/ValidateEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function ValidateEnv(vars) {
return (0, type_graphql_1.createMethodDecorator)(async (_, next) => {
const varsToCheck = Array.isArray(vars) ? vars : [vars];
for (const varToCheck of varsToCheck) {
if (process.env[varToCheck]) {
if (!process.env[varToCheck]) {
throw new Error(`The envionment variable ${varToCheck} is not set. ${hints[varToCheck]}`);
}
}
Expand Down
10 changes: 0 additions & 10 deletions src/server/lib/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ function setEnv({ projectId, emulatorHost, port, backupBucket, backupDir }) {
process.env.SERVER_PORT = port.toString();
process.env.DATASTORE_BACKUP_BUCKET = backupBucket;
process.env.DATASTORE_BACKUP_DIR = backupDir;
const env = ["PROJECT_ID", "DATASTORE_EMULATOR_HOST", "SERVER_PORT", "DATASTORE_BACKUP_BUCKET", "DATASTORE_BACKUP_DIR"];
for (const key of env) {
const element = process.env[key];
if (element) {
console.log("✅", key, element);
}
else {
console.log("❌", key, element);
}
}
}
async function boostrap({ projectId, emulatorHost, port, backupBucket, backupDir }) {
setEnv({ projectId, emulatorHost, port, backupBucket, backupDir });
Expand Down
2 changes: 1 addition & 1 deletion src/server/src/decorators/ValidateEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function ValidateEnv(vars: string | string[]) {
const varsToCheck = Array.isArray(vars) ? vars : [vars];

for (const varToCheck of varsToCheck) {
if (process.env[varToCheck]) {
if (!process.env[varToCheck]) {
throw new Error(
`The envionment variable ${varToCheck} is not set. ${hints[varToCheck]}`
);
Expand Down
12 changes: 0 additions & 12 deletions src/server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ function setEnv({ projectId, emulatorHost, port, backupBucket, backupDir }: Boos
process.env.SERVER_PORT = port.toString();
process.env.DATASTORE_BACKUP_BUCKET = backupBucket;
process.env.DATASTORE_BACKUP_DIR = backupDir;

const env = ["PROJECT_ID", "DATASTORE_EMULATOR_HOST", "SERVER_PORT", "DATASTORE_BACKUP_BUCKET", "DATASTORE_BACKUP_DIR"]

for (const key of env) {
const element = process.env[key];

if (element) {
console.log("✅", key, element);
} else {
console.log("❌", key, element);
}
}
}

async function boostrap({ projectId, emulatorHost, port, backupBucket, backupDir }: BoostrapOptions) {
Expand Down

0 comments on commit ed2906f

Please sign in to comment.