@v1ct0rbr/minivault-web 0.4.0 → 0.4.2
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/minivault-web.js +19 -11
- package/package.json +1 -1
package/dist/minivault-web.js
CHANGED
|
@@ -37,7 +37,9 @@ var h = class extends Error {
|
|
|
37
37
|
let r = await n.text().catch(() => void 0) ?? "";
|
|
38
38
|
throw new h(`Minivault API ${t.method ?? "GET"} ${e} falhou (HTTP ${n.status})${r ? `: ${_(r)}` : ""}`, n.status, r);
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
if (n.status === 204 || n.headers.get("content-length") === "0") return;
|
|
41
|
+
let r = await n.text();
|
|
42
|
+
return r ? JSON.parse(r) : void 0;
|
|
41
43
|
} catch (t) {
|
|
42
44
|
throw t instanceof h || console.error(`[minivault-web] erro em ${this.baseUrl}${e}`, t), t;
|
|
43
45
|
} finally {
|
|
@@ -927,8 +929,8 @@ function Y() {
|
|
|
927
929
|
let e = O(), t = w(), n = T(t.data?.configured), [r, a] = o(!1), [s, c] = o(() => ({
|
|
928
930
|
type: "LOCAL",
|
|
929
931
|
localPath: ""
|
|
930
|
-
})), [l, u] = o(!
|
|
931
|
-
format: "
|
|
932
|
+
})), [l, u] = o(!0), [d, h] = o({
|
|
933
|
+
format: "plain",
|
|
932
934
|
includeData: !0,
|
|
933
935
|
includeDropTable: !1,
|
|
934
936
|
includeCreateTable: !0,
|
|
@@ -1097,7 +1099,7 @@ function Y() {
|
|
|
1097
1099
|
}), /* @__PURE__ */ p("label", {
|
|
1098
1100
|
className: "form-check-label",
|
|
1099
1101
|
htmlFor: "minivault-with-dump-options",
|
|
1100
|
-
children: "Configurar opcoes do dump (formato, dados, indices)"
|
|
1102
|
+
children: "Configurar opcoes do dump (formato, dados, indices) — desmarcar envia sem opcoes (formato padrão custom/binary no servidor)"
|
|
1101
1103
|
})]
|
|
1102
1104
|
}),
|
|
1103
1105
|
l && /* @__PURE__ */ m("div", {
|
|
@@ -1128,22 +1130,28 @@ function Y() {
|
|
|
1128
1130
|
})),
|
|
1129
1131
|
children: [
|
|
1130
1132
|
/* @__PURE__ */ p("option", {
|
|
1131
|
-
value: "
|
|
1132
|
-
children: "
|
|
1133
|
+
value: "plain",
|
|
1134
|
+
children: "Plain SQL (texto, legível — padrão)"
|
|
1133
1135
|
}),
|
|
1134
1136
|
/* @__PURE__ */ p("option", {
|
|
1135
|
-
value: "
|
|
1136
|
-
children: "
|
|
1137
|
+
value: "custom",
|
|
1138
|
+
children: "Custom (-Fc, binário, mais compacto)"
|
|
1137
1139
|
}),
|
|
1138
1140
|
/* @__PURE__ */ p("option", {
|
|
1139
1141
|
value: "tar",
|
|
1140
|
-
children: "Tar (-Ft)"
|
|
1142
|
+
children: "Tar (-Ft, binário)"
|
|
1141
1143
|
})
|
|
1142
1144
|
]
|
|
1143
1145
|
}),
|
|
1144
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ m("div", {
|
|
1145
1147
|
className: "form-text",
|
|
1146
|
-
children:
|
|
1148
|
+
children: [
|
|
1149
|
+
"Plain gera um arquivo SQL legível (",
|
|
1150
|
+
/* @__PURE__ */ p("code", { children: "database_dump.sql" }),
|
|
1151
|
+
") — necessário para nulificar colunas. Custom/Tar geram dump binário (",
|
|
1152
|
+
/* @__PURE__ */ p("code", { children: "database_dump.dump" }),
|
|
1153
|
+
"), não abrir como texto; usar com pg_restore."
|
|
1154
|
+
]
|
|
1147
1155
|
})
|
|
1148
1156
|
]
|
|
1149
1157
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v1ct0rbr/minivault-web",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Módulo independente de gerenciamento de backups (minivault). Consumível como pacote npm em qualquer app React. Cliente do minivault REST API (acesso tipicamente via proxy autenticado).",
|
|
5
5
|
"author": "Victor Queiroga (https://www.linkedin.com/in/victor-queiroga)",
|
|
6
6
|
"license": "MIT",
|