onflyt-cli 0.1.2 → 0.1.4
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.
- package/dist/index.js +13 -7
- package/package.json +1 -1
- package/src/App.tsx +1 -1
- package/src/commands/deploy.tsx +3 -0
- package/src/components/Loading.tsx +1 -1
- package/src/index.tsx +1 -1
- package/src/lib/config.ts +1 -1
- package/src/lib/deploy-api.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -1712,7 +1712,7 @@ var init_config = __esm({
|
|
|
1712
1712
|
CONFIG_DIR = join(homedir(), ".onflyt");
|
|
1713
1713
|
CONFIG_FILE = join(CONFIG_DIR, "config.json");
|
|
1714
1714
|
PROJECT_CONFIG_FILE = "onflyt.json";
|
|
1715
|
-
API_URL = process.env.ONFLYT_API_URL || "";
|
|
1715
|
+
API_URL = process.env.ONFLYT_API_URL || "__ONFLYT_API_URL__";
|
|
1716
1716
|
}
|
|
1717
1717
|
});
|
|
1718
1718
|
|
|
@@ -2261,12 +2261,15 @@ async function getProjectDetails(projectId) {
|
|
|
2261
2261
|
const res = await api.get(`/projects/${projectId}`);
|
|
2262
2262
|
return res.project || res;
|
|
2263
2263
|
}
|
|
2264
|
-
async function startDeployment(projectId, branch, instanceSize, replicas, envVars) {
|
|
2264
|
+
async function startDeployment(projectId, branch, instanceSize, replicas, envVars, buildCommand, installCommand, outputDirectory) {
|
|
2265
2265
|
const deployRes = await api.post(`/deployments/${projectId}/deploy`, {
|
|
2266
2266
|
branch: branch || "main",
|
|
2267
2267
|
instanceSize,
|
|
2268
2268
|
replicas,
|
|
2269
|
-
envVars
|
|
2269
|
+
envVars,
|
|
2270
|
+
buildCommand,
|
|
2271
|
+
installCommand,
|
|
2272
|
+
outputDirectory
|
|
2270
2273
|
});
|
|
2271
2274
|
return deployRes.deploymentId;
|
|
2272
2275
|
}
|
|
@@ -10625,7 +10628,7 @@ var bigText = (str) => {
|
|
|
10625
10628
|
return c;
|
|
10626
10629
|
}).join("");
|
|
10627
10630
|
};
|
|
10628
|
-
var Logo = () => /* @__PURE__ */ React3.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React3.createElement(Box, { alignItems: "center" }, /* @__PURE__ */ React3.createElement(Text2, { color: "rgb(255,191,0)" }, " \u2B21 "), /* @__PURE__ */ React3.createElement(Text2, { bold: true, color: "rgb(255,191,0)" }, bigText("Onflyt")), /* @__PURE__ */ React3.createElement(Text2, null, " "), /* @__PURE__ */ React3.createElement(Text2, { bold: true, color: "black", backgroundColor: "rgb(255,191,0)" }, " ", "v0.1.
|
|
10631
|
+
var Logo = () => /* @__PURE__ */ React3.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React3.createElement(Box, { alignItems: "center" }, /* @__PURE__ */ React3.createElement(Text2, { color: "rgb(255,191,0)" }, " \u2B21 "), /* @__PURE__ */ React3.createElement(Text2, { bold: true, color: "rgb(255,191,0)" }, bigText("Onflyt")), /* @__PURE__ */ React3.createElement(Text2, null, " "), /* @__PURE__ */ React3.createElement(Text2, { bold: true, color: "black", backgroundColor: "rgb(255,191,0)" }, " ", "v0.1.3-beta", " ")));
|
|
10629
10632
|
var ErrorDisplay = ({ message }) => /* @__PURE__ */ React3.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React3.createElement(Logo, null), /* @__PURE__ */ React3.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React3.createElement(Text2, { bold: true, color: "red" }, "\u2716 Error")), /* @__PURE__ */ React3.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React3.createElement(Text2, { color: "red" }, message)));
|
|
10630
10633
|
|
|
10631
10634
|
// src/commands/login.tsx
|
|
@@ -11899,7 +11902,10 @@ var Deploy = ({ teamFlag }) => {
|
|
|
11899
11902
|
projectConfig?.gitBranch || "main",
|
|
11900
11903
|
needsPod ? selectedInstance?.id : void 0,
|
|
11901
11904
|
needsPod ? replicas : void 0,
|
|
11902
|
-
envVars.length > 0 ? envVars : void 0
|
|
11905
|
+
envVars.length > 0 ? envVars : void 0,
|
|
11906
|
+
projectConfig?.buildCommand,
|
|
11907
|
+
projectConfig?.installCommand,
|
|
11908
|
+
projectConfig?.outputDirectory
|
|
11903
11909
|
);
|
|
11904
11910
|
setDeploymentId(depId);
|
|
11905
11911
|
pollStatus(depId);
|
|
@@ -12984,14 +12990,14 @@ import { render } from "ink";
|
|
|
12984
12990
|
import React16 from "react";
|
|
12985
12991
|
import { Text as Text13, Box as Box12 } from "ink";
|
|
12986
12992
|
var App = () => {
|
|
12987
|
-
return /* @__PURE__ */ React16.createElement(Box12, { flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Text13, { bold: true }, " \u2B21 Onflyt CLI v0.1.
|
|
12993
|
+
return /* @__PURE__ */ React16.createElement(Box12, { flexDirection: "column" }, /* @__PURE__ */ React16.createElement(Text13, { bold: true }, " \u2B21 Onflyt CLI v0.1.3-beta"), /* @__PURE__ */ React16.createElement(Text13, null, "Type onflyt --help for available commands"));
|
|
12988
12994
|
};
|
|
12989
12995
|
var App_default = App;
|
|
12990
12996
|
|
|
12991
12997
|
// src/index.tsx
|
|
12992
12998
|
var cli = meow(
|
|
12993
12999
|
`
|
|
12994
|
-
Onflyt CLI v0.1.
|
|
13000
|
+
Onflyt CLI v0.1.3-beta
|
|
12995
13001
|
|
|
12996
13002
|
Usage
|
|
12997
13003
|
$ onflyt <command>
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
package/src/commands/deploy.tsx
CHANGED
|
@@ -283,6 +283,9 @@ const Deploy: React.FC<Props> = ({ teamFlag }) => {
|
|
|
283
283
|
needsPod ? selectedInstance?.id : undefined,
|
|
284
284
|
needsPod ? replicas : undefined,
|
|
285
285
|
envVars.length > 0 ? envVars : undefined,
|
|
286
|
+
projectConfig?.buildCommand,
|
|
287
|
+
projectConfig?.installCommand,
|
|
288
|
+
projectConfig?.outputDirectory,
|
|
286
289
|
);
|
|
287
290
|
|
|
288
291
|
setDeploymentId(depId);
|
package/src/index.tsx
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -6,7 +6,7 @@ const CONFIG_DIR = join(homedir(), ".onflyt");
|
|
|
6
6
|
const CONFIG_FILE = join(CONFIG_DIR, "config.json");
|
|
7
7
|
const PROJECT_CONFIG_FILE = "onflyt.json";
|
|
8
8
|
|
|
9
|
-
export const API_URL = process.env.ONFLYT_API_URL || "";
|
|
9
|
+
export const API_URL = process.env.ONFLYT_API_URL || "__ONFLYT_API_URL__";
|
|
10
10
|
|
|
11
11
|
export interface Config {
|
|
12
12
|
token?: string;
|
package/src/lib/deploy-api.ts
CHANGED
|
@@ -253,12 +253,18 @@ export async function startDeployment(
|
|
|
253
253
|
instanceSize?: ContainerTier,
|
|
254
254
|
replicas?: number,
|
|
255
255
|
envVars?: Array<{ key: string; value: string }>,
|
|
256
|
+
buildCommand?: string,
|
|
257
|
+
installCommand?: string,
|
|
258
|
+
outputDirectory?: string,
|
|
256
259
|
): Promise<string> {
|
|
257
260
|
const deployRes = await api.post<any>(`/deployments/${projectId}/deploy`, {
|
|
258
261
|
branch: branch || "main",
|
|
259
262
|
instanceSize,
|
|
260
263
|
replicas,
|
|
261
264
|
envVars,
|
|
265
|
+
buildCommand,
|
|
266
|
+
installCommand,
|
|
267
|
+
outputDirectory,
|
|
262
268
|
});
|
|
263
269
|
|
|
264
270
|
return deployRes.deploymentId;
|