remove metadata from zip

This commit is contained in:
Ruben Fiszel
2023-02-22 09:12:22 +01:00
parent e81f7bd723
commit c280f6e798
8 changed files with 21 additions and 9 deletions
+12 -1
View File
@@ -1110,7 +1110,18 @@ where
.as_object()
.map(|obj| {
let mut obj = obj.clone();
for key in ["workspace_id", "path", "name", "versions"] {
for key in [
"workspace_id",
"path",
"name",
"versions",
"id",
"created_at",
"updated_at",
"created_by",
"updated_by",
"edited_at",
] {
if obj.contains_key(key) {
obj.remove(key);
}
+1 -1
View File
@@ -17,6 +17,7 @@ export class AppFile implements Resource, PushDiffs {
@property(Any)
policy: Policy;
constructor(value: string, summary: string, policy: Policy) {
this.value = value;
this.summary = summary;
@@ -64,7 +65,6 @@ export class AppFile implements Resource, PushDiffs {
v !== null && typeof v !== "undefined"
);
if (!hasChanges) {
console.log(colors.yellow("! Skipping empty changeset"));
return;
}
-1
View File
@@ -87,7 +87,6 @@ export class FlowFile implements Resource, PushDiffs {
v !== null && typeof v !== "undefined"
);
if (!hasChanges) {
console.log(colors.yellow("! Skipping empty changeset"));
return;
}
-1
View File
@@ -95,7 +95,6 @@ export class FolderFile implements Resource, PushDiffs {
v !== null && typeof v !== "undefined"
);
if (!hasChanges) {
console.log(colors.yellow("! Skipping empty changeset"));
return;
}
-1
View File
@@ -91,7 +91,6 @@ export class ResourceTypeFile implements ResourceI, PushDiffs {
v !== null && typeof v !== "undefined"
);
if (!hasChanges) {
console.log(colors.yellow("! Skipping empty changeset"));
return;
}
-1
View File
@@ -80,7 +80,6 @@ export class ResourceFile implements Resource2, PushDiffs {
v !== null && typeof v !== "undefined"
);
if (!hasChanges) {
console.log(colors.yellow("! Skipping empty changeset"));
return;
}
+8 -2
View File
@@ -192,8 +192,10 @@ async function compareDynFSElement(
if (m2[k] === undefined) {
changes.push({ name: "added", path: k, content: v });
} else if (m2[k] != v) {
// await Deno.writeTextFile("/tmp/k", m2[k])
// await Deno.writeTextFile("/tmp/v", v)
await Deno.writeTextFile("/tmp/k", m2[k])
await Deno.writeTextFile("/tmp/v", v)
console.log(k)
// Deno.exit(1)
changes.push({ name: "edited", path: k, after: v, before: m2[k] });
}
}
@@ -511,6 +513,10 @@ async function push(opts: GlobalOptions & { raw: boolean, yes: boolean }) {
remotePath = parts[0];
}
}
if (diffs.length === 0) {
console.log("No diffs to apply to " + remotePath)
return;
}
return file.pushDiffs(workspace, remotePath, diffs);
}
}
-1
View File
@@ -94,7 +94,6 @@ export class VariableFile implements Resource, PushDiffs {
v !== null && typeof v !== "undefined"
);
if (!hasChanges) {
console.log(colors.yellow("! Skipping empty changeset"));
return;
}
await VariableService.updateVariable({