cassian-cli 0.3.7 → 0.3.9

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.
@@ -61,7 +61,7 @@ export async function init(options = {}) {
61
61
  p.log.info("Run \x1b[32mcassian up\x1b[0m to start your instance.");
62
62
  return;
63
63
  }
64
- p.intro("\x1b[36m⚡ Cassian Setup\x1b[0m");
64
+ console.log();
65
65
  const name = options.name || await p.text({
66
66
  message: "Instance name",
67
67
  placeholder: dirName,
@@ -147,5 +147,8 @@ export async function init(options = {}) {
147
147
  const exclude = excludeRaw.split(",").map(s => s.trim()).filter(Boolean);
148
148
  const yaml = buildYaml({ name, gpuType, gpuCount, diskSize, storage: storageEnabled, exclude });
149
149
  writeFileSync("cassian.yaml", yaml);
150
- p.outro(`\x1b[32m✓\x1b[0m Created cassian.yaml — run \x1b[32mcassian up\x1b[0m to start`);
150
+ console.log();
151
+ console.log(` \x1b[32m✓\x1b[0m Created \x1b[1mcassian.yaml\x1b[0m`);
152
+ console.log(` Run \x1b[32mcassian up\x1b[0m to start your instance.`);
153
+ console.log();
151
154
  }
@@ -34,6 +34,15 @@ export async function sync() {
34
34
  patterns.push(p.endsWith("/") ? `${p}**` : `**/${p}/**`);
35
35
  }
36
36
  }
37
+ // storage: true → skip "storage/" folder
38
+ if (config.storage === true) {
39
+ patterns.push("storage/**");
40
+ }
41
+ else if (Array.isArray(config.storage)) {
42
+ for (const p of config.storage) {
43
+ patterns.push(p.endsWith("/") ? `${p}**` : `**/${p}/**`);
44
+ }
45
+ }
37
46
  if (config.workspace?.storage) {
38
47
  for (const p of config.workspace.storage) {
39
48
  patterns.push(p.endsWith("/") ? `${p}**` : `**/${p}/**`);
package/dist/lib/push.js CHANGED
@@ -10,6 +10,16 @@ export async function pushWorkspace(client, instanceId, config) {
10
10
  patterns.push(p.endsWith("/") ? `${p}**` : `**/${p}/**`);
11
11
  }
12
12
  }
13
+ // storage: true → exclude "storage/" folder; storage: string[] → exclude each
14
+ if (config.storage === true) {
15
+ patterns.push("storage", "storage/**");
16
+ }
17
+ else if (Array.isArray(config.storage)) {
18
+ for (const p of config.storage) {
19
+ const name = p.replace(/\/$/, "");
20
+ patterns.push(`${name}`, `${name}/**`);
21
+ }
22
+ }
13
23
  if (config.workspace?.storage) {
14
24
  for (const p of config.workspace.storage) {
15
25
  const name = p.replace(/\/$/, "");
@@ -29,7 +29,16 @@ function buildIgnorePatterns(config) {
29
29
  patterns.push(p.endsWith("/") ? `${p}**` : `**/${p}/**`);
30
30
  }
31
31
  }
32
- // storage: cold paths, don't sync to laptop (exclude the name itself + contents)
32
+ // storage: true exclude "storage/" folder; array exclude each path
33
+ if (config.storage === true) {
34
+ patterns.push("storage", "storage/**");
35
+ }
36
+ else if (Array.isArray(config.storage)) {
37
+ for (const p of config.storage) {
38
+ const name = p.replace(/\/$/, "");
39
+ patterns.push(name, `${name}/**`);
40
+ }
41
+ }
33
42
  if (config.workspace?.storage) {
34
43
  for (const p of config.workspace.storage) {
35
44
  const name = p.replace(/\/$/, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cassian-cli",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "The Cassian GPU cloud CLI — provision GPUs, sync files, and run workloads from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {