cassian-cli 0.3.8 → 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.
@@ -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.8",
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": {