@joystick.js/cli-canary 0.0.0-canary.1659 → 0.0.0-canary.1660
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{exec as f,execSync as k}from"child_process";import
|
|
1
|
+
import{exec as f,execSync as k}from"child_process";import c from"path";import{fileURLToPath as _}from"url";import g from"fs";const $=_(import.meta.url),n=c.dirname($),D=()=>{try{return k("docker --version",{stdio:"ignore"}),!0}catch{return!1}},P=(o="",s="",{apt_deps:d=[],snap_deps:l=[],npm_deps:a=[]}={})=>new Promise((u,i)=>{if(!D()){process.loader.print("Push requires Docker to deploy your app. Please visit https://docs.docker.com/get-started/get-docker/ to download Docker for your OS."),process.exit();return}process.loader.print("Building Docker image for deployment...");const e=c.join(n,"Dockerfile");if(!g.existsSync(e)){i(new Error(`Dockerfile not found at ${e}`));return}const p=`docker build ${[`CUSTOM_APT_DEPS=${d.join(" ")}`,`CUSTOM_SNAP_DEPS=${l.join(" ")}`,`GLOBAL_NPM_PACKAGES=${a.join(" ")}`].map(r=>`--build-arg ${r}`).join(" ")} -t ${o} -f "${e}" "${s||n}"`;f(p,(r,m,t)=>{if(r){console.error(`Error building Docker image: ${r.message}`),i(r);return}t&&console.error(`Docker build stderr: ${t}`),process.loader.print(m),process.loader.print(`Successfully built Docker image: ${o}`),u()})});var A=P;export{A as default};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@joystick.js/cli-canary",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-canary.
|
|
5
|
-
"canary_version": "0.0.0-canary.
|
|
4
|
+
"version": "0.0.0-canary.1660",
|
|
5
|
+
"canary_version": "0.0.0-canary.1659",
|
|
6
6
|
"description": "The CLI for Joystick.",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"bin": {
|
|
@@ -26,8 +26,8 @@ const build_docker_image = (
|
|
|
26
26
|
) => {
|
|
27
27
|
return new Promise((resolve, reject) => {
|
|
28
28
|
if (!check_docker_installation()) {
|
|
29
|
-
process.loader.print("Push requires Docker to deploy your app.
|
|
30
|
-
|
|
29
|
+
process.loader.print("Push requires Docker to deploy your app. Please visit https://docs.docker.com/get-started/get-docker/ to download Docker for your OS.");
|
|
30
|
+
process.exit();
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
|