Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.3.0 #6

Merged
merged 14 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,121 changes: 1,121 additions & 0 deletions docs/assets/main-DECZbvaO.js

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions docs/assets/main-DhbE6e9P.css

Large diffs are not rendered by default.

Binary file not shown.
156 changes: 156 additions & 0 deletions docs/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Error - Sologger</title>
<style>
:root {
--primary-50: #efede6;
--primary-100: #ddadd8;
--primary-200: #d37fcf;
--primary-300: #d8ca47;
--primary-400: #ff4513;
--primary-500: #302d37;
--surface-50: #e6efe9;
--surface-100: #0f4d42;
--surface-700: #0f4d42;
--surface-800: #052b25;
--surface-900: #021b17;
}

body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: var(--primary-50);
color: var(--surface-800);
}

.container {
text-align: center;
padding: 2rem;
max-width: 600px;
}

.logo {
font-size: 2.5rem;
font-weight: bold;
color: var(--primary-400);
margin-bottom: 2rem;
}

.error-code {
font-size: 6rem;
font-weight: bold;
color: var(--primary-200);
margin: 0;
line-height: 1;
}

.error-title {
font-size: 1.5rem;
margin: 1rem 0;
color: var(--surface-100);
}

.error-message {
margin-bottom: 2rem;
line-height: 1.5;
color: var(--surface-100);
}

.button {
display: inline-block;
padding: 0.75rem 1.5rem;
background-color: var(--primary-300);
color: var(--surface-900);
text-decoration: none;
border-radius: 0.375rem;
font-weight: 500;
transition: background-color 0.2s;
}

.button:hover {
background-color: var(--primary-400);
}

.info {
margin-top: 2rem;
font-size: 0.875rem;
color: var(--surface-100);
}

.info a {
color: var(--primary-400);
}

@media (prefers-color-scheme: dark) {
body {
background-color: var(--surface-900);
color: var(--primary-50);
}

.error-title, .error-message, .info {
color: var(--primary-50);
}
}

@media (max-width: 640px) {
.container {
padding: 1rem;
}
.error-code {
font-size: 4rem;
}
.error-title {
font-size: 1.25rem;
}
}
</style>
</head>
<!-- Rest of the HTML remains the same -->
<body>
<div class="container">
<div class="logo">Sologger</div>
<h1 class="error-code">404</h1>
<h2 class="error-title">Page Not Found</h2>
<p class="error-message">
The page you're looking for doesn't exist or has been moved.
Try checking the URL for typos or return to the homepage.
</p>
<a href="/" class="button">Return to Homepage</a>
<p class="info">
If you believe this is a mistake, please
<a href="https://github.com/brytelands/sologger/issues"
target="_blank"
rel="noopener noreferrer"
style="color: var(--primary-500);">
report the issue
</a>
</p>
</div>

<script>
// Optional: Log error details to console
console.log('Error page loaded:', {
path: window.location.pathname,
referrer: document.referrer,
userAgent: navigator.userAgent
});

// Optional: Track 404s in analytics
if (typeof gtag !== 'undefined') {
gtag('event', '404_error', {
'event_category': 'error',
'event_label': window.location.pathname
});
}
</script>
</body>
</html>
14 changes: 14 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/sologger/sologger_logo_sm.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sologger</title>
<script type="module" crossorigin src="/sologger/assets/main-DECZbvaO.js"></script>
<link rel="stylesheet" crossorigin href="/sologger/assets/main-DhbE6e9P.css">
</head>
<body>
<div id="app"></div>
</body>
</html>
Expand Down
30 changes: 30 additions & 0 deletions docs/sologger-log-transformer-wasm/pkg/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "sologger_log_transformer_wasm",
"type": "module",
"collaborators": [
"Will Kennedy"
],
"description": "This library provides utility to extract and structure logs from Solana API logSubscribe responses and provides WASM support.",
"version": "0.2.1",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/brytelands/sologger"
},
"files": [
"sologger_log_transformer_wasm_bg.wasm",
"sologger_log_transformer_wasm.js",
"sologger_log_transformer_wasm.d.ts"
],
"main": "sologger_log_transformer_wasm.js",
"types": "sologger_log_transformer_wasm.d.ts",
"sideEffects": [
"./snippets/*"
],
"keywords": [
"solana",
"logging",
"json",
"parsing"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* tslint:disable */
/* eslint-disable */
/**
* @param {(string)[]} logs
* @param {(string)[]} program_ids
* @returns {any}
*/
export function parse_logs_basic(logs: (string)[], program_ids: (string)[]): any;
export class WasmLogContextTransformer {
free(): void;
/**
* @param {(string)[]} program_ids
*/
constructor(program_ids: (string)[]);
/**
* @param {any} response
* @returns {any}
*/
from_rpc_response(response: any): any;
/**
* @param {any} rpc_logs_response
* @param {bigint} slot
* @returns {any}
*/
from_rpc_logs_response(rpc_logs_response: any, slot: bigint): any;
}
export class WasmLogParser {
free(): void;
/**
* @param {(string)[]} program_ids
*/
constructor(program_ids: (string)[]);
/**
* @param {(string)[]} logs
* @param {string} transaction_error
* @param {bigint} slot
* @param {string} signature
* @returns {any}
*/
parse_logs(logs: (string)[], transaction_error: string, slot: bigint, signature: string): any;
}

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
readonly memory: WebAssembly.Memory;
readonly __wbg_wasmlogcontexttransformer_free: (a: number, b: number) => void;
readonly wasmlogcontexttransformer_new: (a: number, b: number) => number;
readonly wasmlogcontexttransformer_from_rpc_response: (a: number, b: number, c: number) => void;
readonly wasmlogcontexttransformer_from_rpc_logs_response: (a: number, b: number, c: number, d: number) => void;
readonly __wbg_wasmlogparser_free: (a: number, b: number) => void;
readonly wasmlogparser_new: (a: number, b: number) => number;
readonly wasmlogparser_parse_logs: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
readonly parse_logs_basic: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_exn_store: (a: number) => void;
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
/**
* Instantiates the given `module`, which can either be bytes or
* a precompiled `WebAssembly.Module`.
*
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
*
* @returns {InitOutput}
*/
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
* for everything else, calls `WebAssembly.instantiate` directly.
*
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
*
* @returns {Promise<InitOutput>}
*/
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
Loading
Loading