mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-25 04:44:12 +02:00
Serve the web client from yaak-web (#582)
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ export type HttpResponseState = "initialized" | "connected" | "closed";
|
||||
/**
|
||||
* The resolved send settings, values only: what an executor has to obey, with the sources
|
||||
* (which model each came from) left behind in [`ResolvedHttpRequestSettings`]. This is what
|
||||
* crosses from a tab to the send proxy, and what the proxy reads.
|
||||
* crosses from a tab to the Yaak server, and what the server reads.
|
||||
*/
|
||||
export type HttpSendSettings = { validateCertificates: boolean, followRedirects: boolean,
|
||||
/**
|
||||
|
||||
+1
-1
@@ -307,7 +307,7 @@ export type HttpResponseState = "initialized" | "connected" | "closed";
|
||||
/**
|
||||
* The resolved send settings, values only: what an executor has to obey, with the sources
|
||||
* (which model each came from) left behind in [`ResolvedHttpRequestSettings`]. This is what
|
||||
* crosses from a tab to the send proxy, and what the proxy reads.
|
||||
* crosses from a tab to the Yaak server, and what the server reads.
|
||||
*/
|
||||
export type HttpSendSettings = {
|
||||
validateCertificates: boolean;
|
||||
|
||||
@@ -197,7 +197,7 @@ impl ResolvedHttpRequestSettings {
|
||||
|
||||
/// The resolved send settings, values only: what an executor has to obey, with the sources
|
||||
/// (which model each came from) left behind in [`ResolvedHttpRequestSettings`]. This is what
|
||||
/// crosses from a tab to the send proxy, and what the proxy reads.
|
||||
/// crosses from a tab to the Yaak server, and what the server reads.
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export, export_to = "gen_models.ts")]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "yaak-web"
|
||||
name = "yaak-wasm"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
publish = false
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@yaakapp-internal/web",
|
||||
"name": "@yaakapp-internal/wasm",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"main": "index.ts",
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "yaak-wasm",
|
||||
"type": "module",
|
||||
"version": "0.1.0",
|
||||
"files": [
|
||||
"yaak_wasm_bg.wasm",
|
||||
"yaak_wasm.js",
|
||||
"yaak_wasm_bg.js",
|
||||
"yaak_wasm.d.ts"
|
||||
],
|
||||
"main": "yaak_wasm.js",
|
||||
"types": "yaak_wasm.d.ts",
|
||||
"sideEffects": [
|
||||
"./yaak_wasm.js",
|
||||
"./snippets/*"
|
||||
]
|
||||
}
|
||||
@@ -29,7 +29,7 @@ export function boot(): Promise<void>;
|
||||
* Resolve and render a request for sending, exactly as the desktop does before it puts the
|
||||
* request on the network: the environment chain, inherited headers and auth, request
|
||||
* settings, the cookie jar. Nothing here touches a socket. What comes back is what the tab
|
||||
* posts to the send proxy.
|
||||
* posts to the Yaak server.
|
||||
*
|
||||
* Refuses, with a message the user can act on, when the request needs something this host
|
||||
* doesn't have: an authentication plugin, or a template function.
|
||||
@@ -0,0 +1,9 @@
|
||||
/* @ts-self-types="./yaak_wasm.d.ts" */
|
||||
import * as wasm from "./yaak_wasm_bg.wasm";
|
||||
import { __wbg_set_wasm } from "./yaak_wasm_bg.js";
|
||||
|
||||
__wbg_set_wasm(wasm);
|
||||
wasm.__wbindgen_start();
|
||||
export {
|
||||
blob_delete, blob_get, blob_put, boot, prepare_http_send, rpc
|
||||
} from "./yaak_wasm_bg.js";
|
||||
@@ -66,7 +66,7 @@ export function boot() {
|
||||
* Resolve and render a request for sending, exactly as the desktop does before it puts the
|
||||
* request on the network: the environment chain, inherited headers and auth, request
|
||||
* settings, the cookie jar. Nothing here touches a socket. What comes back is what the tab
|
||||
* posts to the send proxy.
|
||||
* posts to the Yaak server.
|
||||
*
|
||||
* Refuses, with a message the user can act on, when the request needs something this host
|
||||
* doesn't have: an authentication plugin, or a template function.
|
||||
@@ -708,7 +708,7 @@ export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
||||
}
|
||||
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
||||
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 83, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
||||
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h38d884a456ef1afe);
|
||||
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h4381d8e749fe46cf);
|
||||
return ret;
|
||||
}
|
||||
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
||||
@@ -765,8 +765,8 @@ function wasm_bindgen__convert__closures_____invoke__ha1c2fa93df0107f3(arg0, arg
|
||||
}
|
||||
}
|
||||
|
||||
function wasm_bindgen__convert__closures_____invoke__h38d884a456ef1afe(arg0, arg1, arg2) {
|
||||
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h38d884a456ef1afe(arg0, arg1, arg2);
|
||||
function wasm_bindgen__convert__closures_____invoke__h4381d8e749fe46cf(arg0, arg1, arg2) {
|
||||
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h4381d8e749fe46cf(arg0, arg1, arg2);
|
||||
if (ret[1]) {
|
||||
throw takeFromExternrefTable0(ret[0]);
|
||||
}
|
||||
Binary file not shown.
+1
-1
@@ -18,7 +18,7 @@ export const rust_sqlite_wasm_realloc: (a: number, b: number) => number;
|
||||
export const sqlite3_os_end: () => number;
|
||||
export const sqlite3_os_init: () => number;
|
||||
export const wasm_bindgen__convert__closures_____invoke__ha1c2fa93df0107f3: (a: number, b: number, c: any) => [number, number];
|
||||
export const wasm_bindgen__convert__closures_____invoke__h38d884a456ef1afe: (a: number, b: number, c: any) => [number, number];
|
||||
export const wasm_bindgen__convert__closures_____invoke__h4381d8e749fe46cf: (a: number, b: number, c: any) => [number, number];
|
||||
export const wasm_bindgen__convert__closures_____invoke__h2cf3f4cce3b29948: (a: number, b: number, c: any, d: any) => void;
|
||||
export const wasm_bindgen__convert__closures_____invoke__ha7903b6e296dd8f4: (a: number, b: number, c: any) => void;
|
||||
export const wasm_bindgen__convert__closures_____invoke__ha1b480b83daa641f: (a: number, b: number) => void;
|
||||
@@ -478,7 +478,7 @@ impl TemplateCallback for NoPluginsCallback {
|
||||
/// Resolve and render a request for sending, exactly as the desktop does before it puts the
|
||||
/// request on the network: the environment chain, inherited headers and auth, request
|
||||
/// settings, the cookie jar. Nothing here touches a socket. What comes back is what the tab
|
||||
/// posts to the send proxy.
|
||||
/// posts to the Yaak server.
|
||||
///
|
||||
/// Refuses, with a message the user can act on, when the request needs something this host
|
||||
/// doesn't have: an authentication plugin, or a template function.
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "yaak-web",
|
||||
"type": "module",
|
||||
"version": "0.1.0",
|
||||
"files": [
|
||||
"yaak_web_bg.wasm",
|
||||
"yaak_web.js",
|
||||
"yaak_web_bg.js",
|
||||
"yaak_web.d.ts"
|
||||
],
|
||||
"main": "yaak_web.js",
|
||||
"types": "yaak_web.d.ts",
|
||||
"sideEffects": [
|
||||
"./yaak_web.js",
|
||||
"./snippets/*"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
import init from "./yaak_web_bg.wasm?init";
|
||||
export * from "./yaak_web_bg.js";
|
||||
import * as bg from "./yaak_web_bg.js";
|
||||
const instance = await init({ "./yaak_web_bg.js": bg });
|
||||
bg.__wbg_set_wasm(instance.exports);
|
||||
instance.exports.__wbindgen_start();
|
||||
Reference in New Issue
Block a user