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 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.0-beta", " ")));
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.0-beta"), /* @__PURE__ */ React16.createElement(Text13, null, "Type onflyt --help for available commands"));
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.0-beta
13000
+ Onflyt CLI v0.1.3-beta
12995
13001
 
12996
13002
  Usage
12997
13003
  $ onflyt <command>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onflyt-cli",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Onflyt CLI - Deploy Node.js and Python APIs to serverless pods. Pay only per use.",
6
6
  "repository": {
package/src/App.tsx CHANGED
@@ -4,7 +4,7 @@ import { Text, Box } from "ink";
4
4
  const App = () => {
5
5
  return (
6
6
  <Box flexDirection="column">
7
- <Text bold> ⬡ Onflyt CLI v0.1.0-beta</Text>
7
+ <Text bold> ⬡ Onflyt CLI v0.1.4-beta</Text>
8
8
  <Text>Type onflyt --help for available commands</Text>
9
9
  </Box>
10
10
  );
@@ -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);
@@ -24,7 +24,7 @@ export const Logo: React.FC = () => (
24
24
  <Text> </Text>
25
25
  <Text bold color="black" backgroundColor="rgb(255,191,0)">
26
26
  {" "}
27
- v0.1.0-beta{" "}
27
+ v0.1.4-beta{" "}
28
28
  </Text>
29
29
  </Box>
30
30
  </Box>
package/src/index.tsx CHANGED
@@ -17,7 +17,7 @@ import Rollback from "./commands/rollback.js";
17
17
 
18
18
  const cli = meow(
19
19
  `
20
- Onflyt CLI v0.1.0-beta
20
+ Onflyt CLI v0.1.4-beta
21
21
 
22
22
  Usage
23
23
  $ onflyt <command>
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;
@@ -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;