mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
fix(cli): Fix cli pull push (#985)
* Fix workspace tar * Ignore dotfolders
This commit is contained in:
@@ -587,7 +587,7 @@ async fn tarball_workspace(
|
||||
let metadata_str = serde_json::to_string_pretty(&metadata).unwrap();
|
||||
write_to_archive(
|
||||
metadata_str,
|
||||
format!("scripts/{}.json", script.path),
|
||||
format!("scripts/{}.script.json", script.path),
|
||||
&mut a,
|
||||
)
|
||||
.await?;
|
||||
@@ -607,7 +607,7 @@ async fn tarball_workspace(
|
||||
let resource_str = serde_json::to_string_pretty(&resource).unwrap();
|
||||
write_to_archive(
|
||||
resource_str,
|
||||
format!("resources/{}.json", resource.path),
|
||||
format!("resources/{}.resource.json", resource.path),
|
||||
&mut a,
|
||||
)
|
||||
.await?;
|
||||
@@ -627,7 +627,7 @@ async fn tarball_workspace(
|
||||
let resource_str = serde_json::to_string_pretty(&resource_type).unwrap();
|
||||
write_to_archive(
|
||||
resource_str,
|
||||
format!("resource_types/{}.json", resource_type.name),
|
||||
format!("resource_types/{}.resource-type.json", resource_type.name),
|
||||
&mut a,
|
||||
)
|
||||
.await?;
|
||||
@@ -644,7 +644,7 @@ async fn tarball_workspace(
|
||||
|
||||
for flow in flows {
|
||||
let flow_str = serde_json::to_string_pretty(&flow).unwrap();
|
||||
write_to_archive(flow_str, format!("flows/{}.json", flow.path), &mut a).await?;
|
||||
write_to_archive(flow_str, format!("flows/{}.flow.json", flow.path), &mut a).await?;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,7 +658,12 @@ async fn tarball_workspace(
|
||||
|
||||
for var in variables {
|
||||
let flow_str = serde_json::to_string_pretty(&var).unwrap();
|
||||
write_to_archive(flow_str, format!("variables/{}.json", var.path), &mut a).await?;
|
||||
write_to_archive(
|
||||
flow_str,
|
||||
format!("variables/{}.variable.json", var.path),
|
||||
&mut a,
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
a.into_inner().await?;
|
||||
|
||||
@@ -46,7 +46,6 @@ pub struct ExportableListableVariable {
|
||||
pub account: Option<i32>,
|
||||
pub is_oauth: Option<bool>,
|
||||
pub is_expired: Option<bool>,
|
||||
pub is_linked: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
||||
@@ -17,12 +17,14 @@ type Candidate = {
|
||||
};
|
||||
async function findCandidateFiles(dir: string): Promise<Candidate[]> {
|
||||
const candidates: Candidate[] = [];
|
||||
if (dir.startsWith(".")) return [];
|
||||
for await (const e of Deno.readDir(dir)) {
|
||||
if (e.isDirectory) {
|
||||
if (e.name == "u" || e.name == "g") {
|
||||
const newDir = dir + (dir.endsWith("/") ? "" : "/") + e.name;
|
||||
for await (const e2 of Deno.readDir(newDir)) {
|
||||
if (e2.isDirectory) {
|
||||
if (e2.name.startsWith(".")) return [];
|
||||
const groupOrUserName = e2.name;
|
||||
const stack: string[] = [];
|
||||
stack.push(newDir + "/" + groupOrUserName + "/");
|
||||
|
||||
Reference in New Issue
Block a user