@trops/dash-core 0.1.209 → 0.1.210
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/electron/index.js +24 -8
- package/dist/electron/index.js.map +1 -1
- package/package.json +1 -1
package/dist/electron/index.js
CHANGED
|
@@ -29738,7 +29738,7 @@ async function getRegistryProfile$2() {
|
|
|
29738
29738
|
|
|
29739
29739
|
if (response.status === 401) {
|
|
29740
29740
|
// Token expired or invalid — clear stored credentials
|
|
29741
|
-
clearToken$
|
|
29741
|
+
clearToken$2();
|
|
29742
29742
|
return null;
|
|
29743
29743
|
}
|
|
29744
29744
|
if (!response.ok) return null;
|
|
@@ -29753,7 +29753,7 @@ async function getRegistryProfile$2() {
|
|
|
29753
29753
|
/**
|
|
29754
29754
|
* Clear stored auth token (logout).
|
|
29755
29755
|
*/
|
|
29756
|
-
function clearToken$
|
|
29756
|
+
function clearToken$2() {
|
|
29757
29757
|
try {
|
|
29758
29758
|
const s = getStore$1();
|
|
29759
29759
|
s.clear();
|
|
@@ -29784,7 +29784,7 @@ async function updateRegistryProfile$1(updates) {
|
|
|
29784
29784
|
});
|
|
29785
29785
|
|
|
29786
29786
|
if (response.status === 401) {
|
|
29787
|
-
clearToken$
|
|
29787
|
+
clearToken$2();
|
|
29788
29788
|
return null;
|
|
29789
29789
|
}
|
|
29790
29790
|
if (!response.ok) return null;
|
|
@@ -29813,7 +29813,7 @@ async function getRegistryPackages$1() {
|
|
|
29813
29813
|
});
|
|
29814
29814
|
|
|
29815
29815
|
if (response.status === 401) {
|
|
29816
|
-
clearToken$
|
|
29816
|
+
clearToken$2();
|
|
29817
29817
|
return null;
|
|
29818
29818
|
}
|
|
29819
29819
|
if (!response.ok) return null;
|
|
@@ -29850,7 +29850,7 @@ async function updateRegistryPackage$1(scope, name, updates) {
|
|
|
29850
29850
|
);
|
|
29851
29851
|
|
|
29852
29852
|
if (response.status === 401) {
|
|
29853
|
-
clearToken$
|
|
29853
|
+
clearToken$2();
|
|
29854
29854
|
return null;
|
|
29855
29855
|
}
|
|
29856
29856
|
if (!response.ok) return null;
|
|
@@ -29884,7 +29884,7 @@ async function deleteRegistryPackage(scope, name) {
|
|
|
29884
29884
|
);
|
|
29885
29885
|
|
|
29886
29886
|
if (response.status === 401) {
|
|
29887
|
-
clearToken$
|
|
29887
|
+
clearToken$2();
|
|
29888
29888
|
return null;
|
|
29889
29889
|
}
|
|
29890
29890
|
if (!response.ok) return null;
|
|
@@ -29905,7 +29905,7 @@ var registryAuthController$1 = {
|
|
|
29905
29905
|
getRegistryPackages: getRegistryPackages$1,
|
|
29906
29906
|
updateRegistryPackage: updateRegistryPackage$1,
|
|
29907
29907
|
deleteRegistryPackage,
|
|
29908
|
-
clearToken: clearToken$
|
|
29908
|
+
clearToken: clearToken$2,
|
|
29909
29909
|
};
|
|
29910
29910
|
|
|
29911
29911
|
var widgetRegistry$1 = {exports: {}};
|
|
@@ -31913,6 +31913,7 @@ const {
|
|
|
31913
31913
|
getAuthStatus,
|
|
31914
31914
|
getRegistryProfile: getRegistryProfile$1,
|
|
31915
31915
|
getStoredToken: getStoredToken$1,
|
|
31916
|
+
clearToken: clearToken$1,
|
|
31916
31917
|
} = registryAuthController$1;
|
|
31917
31918
|
|
|
31918
31919
|
/**
|
|
@@ -32158,12 +32159,27 @@ async function installThemeFromRegistry$1(win, appId, packageName) {
|
|
|
32158
32159
|
);
|
|
32159
32160
|
|
|
32160
32161
|
// Download the ZIP (with auth header)
|
|
32161
|
-
const headers = {};
|
|
32162
32162
|
const auth = getStoredToken$1();
|
|
32163
|
+
if (!auth) {
|
|
32164
|
+
return {
|
|
32165
|
+
success: false,
|
|
32166
|
+
error: "Not authenticated with registry",
|
|
32167
|
+
authRequired: true,
|
|
32168
|
+
};
|
|
32169
|
+
}
|
|
32170
|
+
const headers = {};
|
|
32163
32171
|
if (auth?.token) {
|
|
32164
32172
|
headers["Authorization"] = `Bearer ${auth.token}`;
|
|
32165
32173
|
}
|
|
32166
32174
|
const response = await fetch(downloadUrl, { headers });
|
|
32175
|
+
if (response.status === 401) {
|
|
32176
|
+
clearToken$1();
|
|
32177
|
+
return {
|
|
32178
|
+
success: false,
|
|
32179
|
+
error: "Authentication expired. Please sign in again.",
|
|
32180
|
+
authRequired: true,
|
|
32181
|
+
};
|
|
32182
|
+
}
|
|
32167
32183
|
if (!response.ok) {
|
|
32168
32184
|
return {
|
|
32169
32185
|
success: false,
|