Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5137a1736 | ||
|
|
2e0cefb684 | ||
|
|
75210ec73a | ||
|
|
031f0514d6 |
17
README.md
17
README.md
@@ -40,6 +40,23 @@ bun run tauri dev
|
||||
bun run tauri build
|
||||
```
|
||||
|
||||
### Signing the application on macOS
|
||||
|
||||
```bash
|
||||
export APPLE_SIGNING_IDENTITY="<YOUR_SIGNING_IDENTITY>"
|
||||
bun run tauri build
|
||||
```
|
||||
|
||||
#### To get the signing identity
|
||||
|
||||
```bash
|
||||
security find-identity -v -p codesigning
|
||||
```
|
||||
|
||||
### Reason for not including appimage in the targets
|
||||
|
||||
Due to an issue with linuxdeploy on my system, I wasn't able to build the appimage so I removed it from the targets.
|
||||
|
||||
### Project Structure
|
||||
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "resona",
|
||||
"version": "0.1.0",
|
||||
"version": "1.0.0",
|
||||
"identifier": "com.resona.app",
|
||||
"build": {
|
||||
"beforeDevCommand": "bun run dev",
|
||||
@@ -23,13 +23,18 @@
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"targets": ["deb", "rpm", "nsis", "msi", "app", "dmg"],
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
],
|
||||
"macOS": {
|
||||
"signingIdentity": null,
|
||||
"providerShortName": null,
|
||||
"entitlements": null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
delete_request,
|
||||
} from "$lib/services/collections";
|
||||
import { get_resolved_variables } from "$lib/services/variables";
|
||||
import { send_request } from "$lib/services/http";
|
||||
import type { Workspace } from "$lib/types/workspace";
|
||||
import type { Collection } from "$lib/types/collection";
|
||||
import type { Request, HttpMethod } from "$lib/types/request";
|
||||
@@ -191,50 +192,30 @@
|
||||
loading = true;
|
||||
response = null;
|
||||
|
||||
// Simulate API request (will be replaced with actual Tauri call later)
|
||||
const startTime = Date.now();
|
||||
|
||||
try {
|
||||
// Mock response for now
|
||||
await new Promise((resolve) =>
|
||||
setTimeout(resolve, 500 + Math.random() * 1000)
|
||||
);
|
||||
const httpResponse = await send_request(request, resolvedVariables);
|
||||
|
||||
const mockBody = JSON.stringify(
|
||||
{
|
||||
success: true,
|
||||
message: "This is a mock response",
|
||||
data: {
|
||||
id: 1,
|
||||
name: "Example",
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
},
|
||||
null,
|
||||
2
|
||||
);
|
||||
const contentType =
|
||||
httpResponse.headers.find((h) => h.key.toLowerCase() === "content-type")
|
||||
?.value ?? "text/plain";
|
||||
|
||||
response = {
|
||||
status: 200,
|
||||
statusText: "OK",
|
||||
headers: [
|
||||
{ key: "Content-Type", value: "application/json" },
|
||||
{ key: "X-Request-Id", value: crypto.randomUUID() },
|
||||
{ key: "Cache-Control", value: "no-cache" },
|
||||
],
|
||||
body: mockBody,
|
||||
contentType: "application/json",
|
||||
duration: Date.now() - startTime,
|
||||
size: new Blob([mockBody]).size,
|
||||
status: httpResponse.status,
|
||||
statusText: httpResponse.statusText,
|
||||
headers: httpResponse.headers,
|
||||
body: httpResponse.body,
|
||||
contentType,
|
||||
duration: httpResponse.timeMs,
|
||||
size: httpResponse.sizeBytes,
|
||||
};
|
||||
} catch (error) {
|
||||
response = {
|
||||
status: 500,
|
||||
status: 0,
|
||||
statusText: "Error",
|
||||
headers: [],
|
||||
body: JSON.stringify({ error: "Request failed" }),
|
||||
contentType: "application/json",
|
||||
duration: Date.now() - startTime,
|
||||
body: error instanceof Error ? error.message : "Request failed",
|
||||
contentType: "text/plain",
|
||||
duration: 0,
|
||||
size: 0,
|
||||
};
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user