UNPKG

629 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const fs = require("fs");
4exports.getProjectId = () => {
5 try {
6 const config = JSON.parse(fs.readFileSync('./.dogcli', 'utf8'));
7 if (config.projectId === undefined) {
8 throw Error('AppId not selected');
9 }
10 return config.projectId;
11 }
12 catch (e) {
13 console.log(`
14This directory doesn't seem to be initialized for deployment.
15
16Either run this command again from the root of your project or initialize this project with the following command:
17
18dog apps:init
19`);
20 process.exit(1);
21 }
22};