ztechno_cli 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,6 +8,7 @@ exports.dockerBuild = dockerBuild;
|
|
|
8
8
|
const child_process_1 = require("child_process");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const fs_1 = __importDefault(require("fs"));
|
|
11
|
+
const dotenv_1 = require("dotenv");
|
|
11
12
|
// ANSI color helpers
|
|
12
13
|
const red = (msg) => `\x1b[31m${msg}\x1b[0m`;
|
|
13
14
|
const green = (msg) => `\x1b[32m${msg}\x1b[0m`;
|
|
@@ -27,6 +28,7 @@ function loadPackageJson() {
|
|
|
27
28
|
* @param opt.context - Docker build context path (defaults to ".")
|
|
28
29
|
*/
|
|
29
30
|
function dockerBuild(opt) {
|
|
31
|
+
(0, dotenv_1.config)({ path: path_1.default.join(process.cwd(), '.env'), quiet: true });
|
|
30
32
|
const pkg = loadPackageJson();
|
|
31
33
|
const packagename = opt?.packagename || pkg.name;
|
|
32
34
|
const awsAccountId = opt?.awsAccountId || pkg.config?.awsAccountId || process.env.AWS_ACCOUNT_ID;
|
|
@@ -8,6 +8,7 @@ exports.dockerPush = dockerPush;
|
|
|
8
8
|
const child_process_1 = require("child_process");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const fs_1 = __importDefault(require("fs"));
|
|
11
|
+
const dotenv_1 = require("dotenv");
|
|
11
12
|
// ANSI color helpers
|
|
12
13
|
const red = (msg) => `\x1b[31m${msg}\x1b[0m`;
|
|
13
14
|
const green = (msg) => `\x1b[32m${msg}\x1b[0m`;
|
|
@@ -26,6 +27,7 @@ function loadPackageJson() {
|
|
|
26
27
|
* @param opt.tag - Override the tag (defaults to "latest")
|
|
27
28
|
*/
|
|
28
29
|
function dockerPush(opt) {
|
|
30
|
+
(0, dotenv_1.config)({ path: path_1.default.join(process.cwd(), '.env'), quiet: true });
|
|
29
31
|
const pkg = loadPackageJson();
|
|
30
32
|
const packagename = opt?.packagename || pkg.name;
|
|
31
33
|
const awsAccountId = opt?.awsAccountId || pkg.config?.awsAccountId || process.env.AWS_ACCOUNT_ID;
|